slidoapp / dbt-superset-lineage

Make dbt docs and Apache Superset talk to one another
MIT License
134 stars 18 forks source link

Fix SQL parsing through `sqlfluff` #25

Closed one-data-cookie closed 1 year ago

one-data-cookie commented 1 year ago

In its v1.3, sqlfluff introduced breaking changes. One of the things was a change to the parsing tree. To replace the original sql_parsed.tree.recursive_crawl, this introduces own crawl_dict_recursive function to apply on sql_parsed. On top of that, additional small changes were needed to achieve the same output format.

one-data-cookie commented 1 year ago

@one-data-cookie one last thing: do you think it would make sense to pin the current version of sqlfluff in requirements.txt so that you can be sure some future change won't mess this up? 🙂

Good point! As it's now fixed to stay < 2.0.0, I'd keep it as is.

Thank you for and merging!