Fix!: stop treating dbt schema data types as columns_to_types#5231
Merged
georgesittas merged 4 commits intomainfrom Aug 27, 2025
Merged
Fix!: stop treating dbt schema data types as columns_to_types#5231georgesittas merged 4 commits intomainfrom
georgesittas merged 4 commits intomainfrom
Conversation
erindru
approved these changes
Aug 26, 2025
932b188 to
8ffd8c5
Compare
izeigerman
reviewed
Aug 27, 2025
47f42de to
9f17fa1
Compare
6664c5c to
9531e27
Compare
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.
After changing
sushi_dbtas I did in this PR, the following commands run successfully and I can seeunused_columninlocal.duckdb:Whereas SQLMesh fails to execute the project, because it currently treats the columns in
schema.yamlas the source of truth, which does not match dbt's behavior:I verified locally (using
dbt-duckdb) that settingdata_typeinschema.ymldoes not determine the actual DDL type. For example, for a simple model likeSELECT 1 AS c, the following entry does not result in aTEXTtype forc:The
data_typeappears to mostly be relevant whencontractisenforced, in which case it acts as an audit. For example, if I add the following config to the above model:I see this error at runtime (
dbt compileran fine):