Column-Level Lineage from SQL with SQLGlot
Which columns feed this number? SQLGlot can answer in 15 lines, and I will show you where it misleads.
Video #205 ยท Data governance
Steps in the video
Files
- columns.py (17 lines)
- gaps.py (14 lines)
- impact.py (12 lines)
- queries.py (20 lines)
- show.py (16 lines)
Tested with
Python 3.12.15 | sqlglot==30.23.0
What this does not show
Three simple queries in the default dialect; filter and join columns are not in this lineage, and it reads SQL text, not what ran.
Sources
Learning IT by Example.