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

Fix comma condition for alter_relation_add_remove_columns #4147

Closed
jtcohen6 opened this issue Oct 27, 2021 · 0 comments · Fixed by #4148
Closed

Fix comma condition for alter_relation_add_remove_columns #4147

jtcohen6 opened this issue Oct 27, 2021 · 0 comments · Fixed by #4148
Labels
bug Something isn't working incremental Incremental modeling with dbt
Milestone

Comments

@jtcohen6
Copy link
Contributor

jtcohen6 commented Oct 27, 2021

Noticed this while testing on_schema_change with different incremental strategies to chase down an unrelated bug. If we have remove_columns but no add_columns, we're going to add a comma where we don't need one:

{% endfor %}{{ ',' if remove_columns | length > 0 }}

alter table "jerco"."dbt_jcohen"."my_incremental_model"
       
            ,
            
            
                drop column another_new_column

This should be a super quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working incremental Incremental modeling with dbt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant