You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% if add_columns is none %}
{% set add_columns = [] %}
{% endif %}
{% if remove_columns is none %}
{% set remove_columns = [] %}
{% endif %}
{% set sql -%}
{% if add_columns %}
alter {{ relation.type }} {{ relation }}
add
{% for column in add_columns %}
{{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}
{% endfor %}{# ',' if add_columns and remove_columns #}
{% endif %}
{% if remove_columns %}
alter {{ relation.type }} {{ relation }}
drop column
{% for column in remove_columns %}
{{ column.name }}{{ ',' if not loop.last }}
{% endfor %}
{% endif %}
{%- endset -%}
{% do run_query(sql) %}
{% endmacro %}
The same macro could be used to solve the bug in this package. The right place to put it is inside the columns.sql file.
The following query failed when the source table has a column removed
The full error message is
Same error for
on_schema_change = "append_new_columns",
and if I use
I'll get this error message:
The text was updated successfully, but these errors were encountered: