Skip to content

Commit

Permalink
Incremental model show reason for on_schema_change fail failures (#5505)
Browse files Browse the repository at this point in the history
* show reason for schema change failures

When the incremental model fails, I do not get the context I need to easily fix my discrepency.
Adding more info

* Update on_schema_change.sql

Fix identation

* Added changie changes

Added changie changes

* Update on_schema_change.sql

Trim whitespaces

* Update on_schema_change.sql

Log message text  enhancement
  • Loading branch information
ilanbenb authored Aug 12, 2022
1 parent a3b018f commit 7efb6ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220720-213746.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: on_shchma_change fail verbosity enhancement
time: 2022-07-20T21:37:46.474241+03:00
custom:
Author: Ilanbenb
Issue: "5504"
PR: "5505"
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
- set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.
- Re-run the incremental model with `full_refresh: True` to update the target schema.
- update the schema manually and re-run the process.

Additional troubleshooting context:
Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}
Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}
New column types: {{ schema_changes_dict['new_target_types'] }}
{% endset %}

{% do exceptions.raise_compiler_error(fail_msg) %}
Expand Down

0 comments on commit 7efb6ab

Please sign in to comment.