[dagster-dbt] support newer sqlglot versions - #34098
Draft
sebfest wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Relaxes the
sqlglotupper bound indagster-dbtso it can coexist with currentacryl-datahub[dbt]releases.The practical motivation is compatibility with the current DataHub integration.
acryl-datahub 1.6.0.10, released July 5, 2026, requiressqlglot[c]==30.8.0for itsdbtextra (PyPI metadata). Keeping Dagster's<28.1.0cap prevents dependency resolution with that version, leaving users on an older DataHub release and therefore an older DataHub API/interface.SQLGlot 28.1.0, the first version blocked by the cap, was released on December 2, 2025 (PyPI release history). As of August 10, 2026, that version is 251 days old, while the current DataHub dbt integration requires the 30.8.0 line.
SQLGlot 28.1+ changed its optimizer/lineage behavior. Dagster was passing an optimized AST directly to
sqlglot.lineage(), which can fail for CTE/join queries because optimized aliases may be strings:This PR serializes the optimized AST before the lineage call, allowing SQLGlot to reparse it into the expected expression representation, then removes the
<28.1.0cap.Breaking change: No. This relaxes the dependency constraint and preserves the existing lineage behavior while fixing compatibility with newer SQLGlot versions.
Test plan
test_column_lineage_integration[async-duckdb-all]passes with SQLGlot 28.1.0.ruff checkpasses.uv lock --checkpasses.Closes #34097