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

ADAP-972: Fix issue where materialized views were being mapped as tables in catalog queries #996

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Oct 31, 2023

resolves #995, dbt-labs/dbt-core#8864

Problem

Materialized views were being mapped as tables in catalog queries.

Solution

  • write a test demonstrating the issue
  • update the catalog query to return the correct type

Checklist

  • I have read the contributing guide and understand what's expected of me
  • 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
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Oct 31, 2023
@mikealfare mikealfare requested a review from a team as a code owner October 31, 2023 02:23
@cla-bot cla-bot bot added the cla:yes label Oct 31, 2023
@mikealfare mikealfare marked this pull request as draft October 31, 2023 02:23
@mikealfare mikealfare added backport 1.7.latest bug Something isn't working labels Oct 31, 2023
@mikealfare mikealfare marked this pull request as ready for review October 31, 2023 02:48
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

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

Several nits around Jinja implementation.

Logic seems good since you're just adding on an extra information schema call and differentiating that set from the existing set.

Great test with exhaustive but clear use cases. That yield for the docs fixture is magical

@mikealfare mikealfare merged commit f6e26d0 into main Oct 31, 2023
13 checks passed
@mikealfare mikealfare deleted the materialized-views/catalog-query branch October 31, 2023 04:41
github-actions bot pushed a commit that referenced this pull request Oct 31, 2023
…les in catalog queries (#996)

* changelog
* add test demonstrating issue
* update catalog query to correctly identify materialized views

(cherry picked from commit f6e26d0)
mikealfare added a commit that referenced this pull request Nov 1, 2023
…les in catalog queries (#996) (#997)

* changelog
* add test demonstrating issue
* update catalog query to correctly identify materialized views

(cherry picked from commit f6e26d0)

Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla:yes
Projects
None yet
2 participants