Fix: update sushi.marketing so it does not check scd time column types#3988
Closed
georgesittas wants to merge 1 commit intomainfrom
Closed
Fix: update sushi.marketing so it does not check scd time column types#3988georgesittas wants to merge 1 commit intomainfrom
georgesittas wants to merge 1 commit intomainfrom
Conversation
tobymao
approved these changes
Mar 13, 2025
Contributor
Contributor
Author
|
Closing this for now as I temporarily reverted the DuckDB changes upstream, see #3989. |
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.
This commit changed how DuckDB parses
DATETIMEandTIMESTAMP; these types are now not timezone-aware.The marketing sushi model started failing due to this change, because there's an assertion about its columns & their types. The catch is that the "expected" types for
valid_fromandvalid_toin this mapping are parsed using DuckDB, so the resultingDataTypeinstances are different than the actual ones:Here's where the SCD2 types are constructed: https://github.com/TobikoData/sqlmesh/blob/cdd97c51a14eb1f4441228a6cbd479fd77587849/sqlmesh/core/model/kind.py#L674
Just putting this here for discussion, but not sure yet if we should change the above
DataType.buildcall in the SCD kind'stime_data_typeto build aTIMESTAMPNTZinstead.