Skip to content

Commit

Permalink
Fix create_columns macro invocation to be more general.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwallace582 committed May 27, 2024
1 parent 44f46eb commit 29bd8c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% macro mariadb__create_columns(relation, columns) %}
{% for column in columns %}
{% call statement() %}
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
{% endcall %}
{% endfor %}
{% endmacro %}
Expand Down Expand Up @@ -70,7 +70,7 @@
| rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')
| list %}

{% do mariadb__create_columns(target_relation, missing_columns) %}
{% do create_columns(target_relation, missing_columns) %}

{% set source_columns = adapter.get_columns_in_relation(staging_table)
| rejectattr('name', 'equalto', 'dbt_change_type')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% macro mysql__create_columns(relation, columns) %}
{% for column in columns %}
{% call statement() %}
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
{% endcall %}
{% endfor %}
{% endmacro %}
Expand Down Expand Up @@ -70,7 +70,7 @@
| rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')
| list %}

{% do mysql__create_columns(target_relation, missing_columns) %}
{% do create_columns(target_relation, missing_columns) %}

{% set source_columns = adapter.get_columns_in_relation(staging_table)
| rejectattr('name', 'equalto', 'dbt_change_type')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% macro mysql5__create_columns(relation, columns) %}
{% for column in columns %}
{% call statement() %}
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
{% endcall %}
{% endfor %}
{% endmacro %}
Expand Down Expand Up @@ -70,7 +70,7 @@
| rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')
| list %}

{% do mysql5__create_columns(target_relation, missing_columns) %}
{% do create_columns(target_relation, missing_columns) %}

{% set source_columns = adapter.get_columns_in_relation(staging_table)
| rejectattr('name', 'equalto', 'dbt_change_type')
Expand Down

0 comments on commit 29bd8c4

Please sign in to comment.