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 "dbt found two resources" error with multiple snapshot blocks in one file #4773

Merged
merged 3 commits into from
Feb 25, 2022

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Feb 23, 2022

resolves #4771

Description

Loop through nodes when processing mssat files, instead of assuming that there is only one.

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

@gshank gshank requested review from a team as code owners February 23, 2022 20:34
@cla-bot cla-bot bot added the cla:yes label Feb 23, 2022
@@ -35,6 +35,7 @@ Contributors:
### Fixes
- Fix bug causing empty node level meta, snapshot config errors ([#4459](https://github.com/dbt-labs/dbt-core/issues/4459), [#4726](https://github.com/dbt-labs/dbt-core/pull/4726))
- Fix slow `dbt run` when using Postgres adapter, by deduplicating relations in `postgres_get_relations` ([#3058](https://github.com/dbt-labs/dbt-core/issues/3058), [#4521](https://github.com/dbt-labs/dbt-core/pull/4521))
- Fix partial parsing bug with multiple snapshot blocks ([#4771](https//github.com/dbt-labs/dbt-core/issues/4772), [#4773](https://github.com/dbt-labs/dbt-core/pull/4773))
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that this one is worth backporting + including in 1.0.4

Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

LGTM

@gshank gshank merged commit 220d8b8 into main Feb 25, 2022
@gshank gshank deleted the ct-273_pp_multiple_snapshot_blocks branch February 25, 2022 15:54
gshank added a commit that referenced this pull request Mar 16, 2022
…one file (#4773)

* Fix handling of multiple snapshot blocks in partial parsing

* Update tests for partial parsing snapshots
gshank added a commit that referenced this pull request Mar 16, 2022
…one file (#4773) (#4877)

* Fix handling of multiple snapshot blocks in partial parsing

* Update tests for partial parsing snapshots
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.

[CT-273] [Bug] modifying snapshot files with multiple snapshots causes error (partial parsing)
3 participants