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

Bugfix/group reserved kw union data v3 #58

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

fivetran-jamie
Copy link
Contributor

@fivetran-jamie fivetran-jamie commented Dec 9, 2024

PR Overview

This PR will address the following Issue/Feature:
https://getdbt.slack.com/archives/C01D1R2JLLA/p1733513338340409

This PR will result in the following new package version:

v0.14.1

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

Bug Fixes

  • In v0.19.0, Snowflake users may have seen when searching for a relation, dbt found an approximate match errors when running the stg_zendesk__group_tmp model. We have updated the adapter.get_relation() logic that was causing this error.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

Recreated the issue in snowflake by creating a group table (selecting from the group_data seed file)

  When searching for a relation, dbt found an approximate match. Instead of guessing 
  which relation to use, dbt will move on. Please delete "DBT_PACKAGE_TESTING"."ZZ_DBT_JAMIE_1"."GROUP", or rename it to be less ambiguous.
  Searched for: DBT_PACKAGE_TESTING.ZZ_DBT_JAMIE_1."GROUP"
  Found: "DBT_PACKAGE_TESTING"."ZZ_DBT_JAMIE_1"."GROUP"
  
  > in macro default__union_zendesk_connections (macros/union/union_zendesk_connections.sql)
  > called by macro union_zendesk_connections (macros/union/union_zendesk_connections.sql)
  > called by model stg_zendesk__group_tmp (models/tmp/stg_zendesk__group_tmp.sql)

After applying the changes, confirmed that it works in Snowflake, BigQuery, and Redshift (@fivetran-joemarkiewicz will run on Postgres as I am having some terminal issues) when the table is named group, when the identifier var is used (ie to run on group_data), and when the table is missing (I changed the identifier var value to something random like group_fake_alias)

If you had to summarize this PR in an emoji, which would it be?

🏂

@fivetran-jamie fivetran-jamie marked this pull request as ready for review December 9, 2024 21:19
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

@fivetran-jamie I was able to confirm that this is not/no longer an issue on Postgres when running locally with the group table retaining the reserved word naming convention.

I just have a request to make sure you remove the commented out Jinja logs are removed as well as a small wording suggestion update in the CHANGELOG. Otherwise this looks good to go!

macros/union/union_zendesk_connections.sql Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

lgtm!

@fivetran-jamie fivetran-jamie merged commit c732bdb into main Dec 9, 2024
7 checks passed
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.

3 participants