sqllineage
sqllineage copied to clipboard
Does column lineage have order (from tableA to tableB)? The order seems to be wrong when subquery-to-subquery
In my nested SQL query code it looks like this:
select T.* from ( select tmp.* from ( select RY.* from table RY) tmp ) T
When I'm trying to debug the code and watch the lineages it gets a result like this:
(Column: TMP.*, Column: T.*, Column: RY.*)
Looks like it has lineage from TMP -> T -> RY
(all of them's fathers are SubQuery
types), where RY
is actually on the most inside and T.* on the most outside. Seems RY.*->tmp.*->T.*
makes sense to me.
When I was looking up in other posts, it says in a parsed lineage tuple, "the last one is the downstream table/columns, while the rest are upstream(source) table/columns". ( # 元组中最后一个元素为下游表名与字段名,其他元素为上游表名与字段名) Link
Clearly this goes against what I expected. Am I missing some concepts here?
This looks like a bug. Can you share the sqllineage version and dialect you're using? Also are you getting the lineage result from command line, or viewing it in UI?
Close as no further response.