-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
override seed types #708
override seed types #708
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. I agree that this code should be ripped out of adapters. This PR is sort of confusing to read because of adapter inheritance and because of this being done in slightly different ways on BQ vs PG/Snowflake/Redshift (_agate_to_schema in one place, inline in the other). But I don't want to commit to that type of rewrite right now, so this is approved
Just added a couple more tests for bq, snowflake. Will merge when green again |
The following config will force the
create table
statement for thecountry_codes.csv
file to use atext
type for theid
field.I don't love the idea of adding another arbitrary config to the
seeds
block, but I'm unsure where else we can implement this.I know some folks also want this functionality for models too, but we don't have a good way of overriding column types for
create table as (...)
statements. @cmcarthur really keen to hear your thoughts about all of this.Regarding the code in this PR: I think a lot of it should be ripped out of the adapters. If possible, I'd like to make a
seed
materialization which encodes this logic, then execute the seed nodes as we would any other node. I don't love the amount of business logic in the SeedRunner classTODO: