Skip to content
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

Fixed the behavior of the incremental schema change ignore option to properly handle the scenario when columns are dropped #980

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@

{% macro get_insert_into_sql(source_relation, target_relation) %}

-- {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}
-- {%- set common_columns = [] -%}
-- {%- for dest_col in dest_columns -%}
-- {%- for source_col in source_columns -%}
-- {%- if dest_col.name == source_col.name -%}
-- {%- if common_columns.append(dest_col) -%}{%- endif -%}
-- {%- endif -%}
-- {%- endfor -%}
-- {%- endfor -%}
-- {%- set dest_cols_csv = common_columns | map(attribute='quoted') | join(', ') -%}
-- insert into table {{ target_relation }} ({{ dest_cols_csv }})
{%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}
{%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}
insert into table {{ target_relation }}
Expand Down
Loading