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 for alter table ... rename statements on Snowflake #1324

Merged
merged 3 commits into from
Feb 28, 2019

Conversation

drewbanin
Copy link
Contributor

On Snowflake, alter ... rename statements must include the destination database/schema. Before this change, dbt was just issuing a query like:

alter table analytics.prod_ecommerce.orders__dbt_tmp to orders

which resulted in the table being renamed to:

analytics.prod.orders

where prod is the schema specified in the active target. Note that this bug only affects models built into custom schemas.

Additionally, added a line of code to correctly render source counts in info level logs during compilation.

@drewbanin
Copy link
Contributor Author

hmm, looking at the failed unit test, it's possible this never worked correctly? This test has existed for at least 6 months! 99a04e9#diff-25f914e762c6923bab81d1ddd34778cfR93

Copy link
Member

@cmcarthur cmcarthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems uncontroversial... approved

@drewbanin drewbanin merged commit e466096 into dev/stephen-girard Feb 28, 2019
@drewbanin drewbanin deleted the fix/snowflake-rename branch February 28, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants