Repository navigation
fix(duckshop): declare the columns staging models output and downstream models read - #1297
Merged
Merged
Conversation
…am models read Sixteen staging models output source_seq and source_loaded_at, and some a payload column, that their MODEL headers did not declare, although downstream models read them. Declaring them makes each declared schema cover what its readers use, so tables created from the declarations support every downstream model. Compiled SQL is unchanged.
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.
Why
Sixteen DuckShop staging models output columns that their
MODELheaders do not declare: thesource_seqandsource_loaded_atload metadata from@sql.load_metadata, and in some models apayload column such as
contents,itemsortier_history. Downstream models read those columns,so a table built from the declared columns alone cannot serve them. Compiling every model against
empty tables created from the declarations failed for 17 downstream models with an invalid
identifier.
Changes
storefront and support), with the types and nullability the models produce.
Verification
sqb compilewith sqlbuild 0.187.0: 0 errors, 0 warnings.(
1ff1d0955ea3839b3c969707fd47ca9a4d7d7216753759d23911836f6ea5879d).benchmarks/duckshop/tests,project/tests): 291 passed, 3 skipped.column read.
make check-cipasses.