Hi community,

I’m trying to extract column lineage from Flink SQL jobs (all of them are 
single INSERT statements). Here’s what I have done:

1. From `SqlToOperationConverter#convertSqlInsert()`, get the 
`PlannerQueryOperation` generated by the INSERT statement.

2. Get the corresponding `RelNode` by calling 
`PlannerQueryOperation#getCalciteTree()`, whose root is a `LogicalProject`.

3. Use the `RelMdColumnOrigins` metadata in Calcite to fetch column lineage, 
i.e.
`relNode.getCluster.getMetadataQuery.getColumnOrigins(relNode, 1)`


However, the column origins are always null or empty sets, which is quite 
confusing. Any suggestions on this would be appreciated.


Many thanks~


Reply via email to