-
Notifications
You must be signed in to change notification settings - Fork 56
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
Incremental loads don't work where schema is different. Implement on_schema_change #48
Comments
I've sorted my particular issue with an override macro using your function:
Had to switch to use the tmp_relation to retrieve the columns and then add a list of fields to insert into otherwise data type mismatches happen when inserting ordinally |
@prgx-aeveri01 would you like to open a PR to fix incremental macro? Your snippet looks like a fix for the issue. |
Done! I haven't update the .readme in case other changes were getting wrapped up into the released version. If you want me to do that, feel free to add comments into the PR |
Bump version: 0.19.2rc2 → 0.20.0rc1
Hey guys,
If your destination table doesn't have the same columns as your model the whole model fails.
Example
If Table A has ID, Text1, Date1 in it's field list and the dbt model has TableA as ID, Text1 on dbt run the model will fail regardless of the on_schema_change setting. It seems the incremental macro retrieves the list of columns to insert into from the destination table and never checks them against the model for schema diffs?
The text was updated successfully, but these errors were encountered: