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

Use old_relation for renaming in default materializations #3547

Merged
merged 8 commits into from
Jul 28, 2021

Conversation

danielefrigo
Copy link
Contributor

resolves #2161

Description

change renamed relation to make sure dbt generates the right alter ... rename statement is the materilization type has changed from previous model run

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@cla-bot cla-bot bot added the cla:yes label Jul 8, 2021
@danielefrigo danielefrigo temporarily deployed to Postgres July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Bigquery July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Bigquery July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Snowflake July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Snowflake July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Redshift July 8, 2021 16:59 Inactive
@danielefrigo danielefrigo temporarily deployed to Redshift July 8, 2021 16:59 Inactive
@danielefrigo
Copy link
Contributor Author

I checked locally and the only failed test is test/integration/004_simple_snapshot_test/test_simple_snapshot.py, which I doubt is influenced by my changes on table and view materializations.
So I tried a git checkout of the last commit previous to my changes, and this test is giving me the same error.

Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

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

Thanks for this, @danielefrigo! You're right, the failing test was something flakey/unrelated.

Two tiny changes to the Changelog, then this is good to go.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@jtcohen6
Copy link
Contributor

@danielefrigo When you get a chance, could you resolve conflicts / update the changelog? Then this is good to go!

danielefrigo and others added 2 commits July 28, 2021 08:48
Co-authored-by: Jeremy Cohen <jtcohen6@gmail.com>
@danielefrigo
Copy link
Contributor Author

sorry for the delay, I've been on vacation with no chance to work on it.
is it ok now?

Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

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

Thanks @danielefrigo !

@jtcohen6 jtcohen6 merged commit c448702 into dbt-labs:develop Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use old_relation for renaming in default materializations
2 participants