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

Remove unneeded code in default snapshot materialization #4993

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Apr 4, 2022

resolves #4742

Not just unneeded, also incorrect!

Description

See #4742 (comment) for the archaeology

tl;dr:

  • We added this in-materialization create_schema a long time ago (Dec 2017), back when snapshots were archives defined in dbt_project.yml
  • When we converted archives to snapshots (real DAG nodes), in 2019, we did the thing that makes schema creation happen implicitly during the snapshot task, just like for models in the run task
  • We never removed the explicit create_schema from the snapshot materialization. We even tweaked it to fix unexpected behavior, when the real fix would have been to remove it entirely
  • Let's remove it entirely :)

Testing

This is already covered by test_cross_schema_snapshot, which would fail if dbt did not first create {test_schema}_snapshotted while running the snapshot task.

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 added information about my change to be included in the CHANGELOG.

@jtcohen6 jtcohen6 added the Team:Adapters Issues designated for the adapter area of the code label Apr 4, 2022
@jtcohen6 jtcohen6 requested a review from a team April 4, 2022 12:49
@jtcohen6 jtcohen6 requested review from a team as code owners April 4, 2022 12:49
@cla-bot cla-bot bot added the cla:yes label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-254] dbt-core - Snapshot - macro dbt_macro__create_schema takes not more than 1 argument(s)
2 participants