Pull all select, where, and join columns (plus column aliases) for each table #3114
-
Hi all, I’m working on a project that requires knowing all of the columns (actual plus alias) selected from each source and temp table, including where and join statements. I had trouble building code that worked with more complex CTEs, and I saw some potential in the qualify columns optimizer code but didn’t see how to pluck out the right pieces for what I need. Has anyone worked on anything similar to this and maybe has some code or helper functions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You may find this article helpful, written by Alessandro Pizzini: https://medium.com/@pizzini.alessandro/monitoring-column-usage-with-sqlglot-a-journey-towards-data-warehouse-optimization-299667aa44dc. |
Beta Was this translation helpful? Give feedback.
You may find this article helpful, written by Alessandro Pizzini: https://medium.com/@pizzini.alessandro/monitoring-column-usage-with-sqlglot-a-journey-towards-data-warehouse-optimization-299667aa44dc.