queryparser
queryparser copied to clipboard
how to extract src/target map of column lineage?
ie srctableA.srcColumn1 = trgtableB.trgColumnX srctableA.srcColumn3 = trgtableB.trgColumnY
+1. Could we get the column lineage info?
Column lineage, if i remember correctly, isn't currently implemented, and all the original authors (myself included) are not active on this project. However, if you're interested in contributing, I can help approve a PR.
The challenge we had with column lineage is with representing multiple column inputs. some, like SELECT table.username
or SELECT avg(table.leftvalue, table.rightvalue)
are straightforward, but some are more unintuitive, like SELECT CASE WHEN table.type = 'foo' THEN table.foovalue ELSE table.barvalue END
. Representing those in the same output as the rest was not immediately obvious without an overly verbose solution
@wangqinghuan see https://github.com/tooptoop4/presto_sql_lineage