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

Add package and model name in surrogate_key warning #258

Merged
merged 3 commits into from
Jul 30, 2020

Conversation

tayloramurphy
Copy link

@tayloramurphy tayloramurphy commented Jul 27, 2020

Description & motivation

This adds the package and model name to the surrogate key deprecation warning.

I tested by directly editing the macro in dbt modules after running deps. Produces:

Running with dbt=0.17.1
Warning: the surrogate_key macro now takes a single list argument instead of multiple string arguments. Support for multiple string arguments will be deprecated in a future release of dbt-utils. The gitlab_snowflake.arr_changes_sfdc_account_monthly model triggered this warning.
Parsing on run start hooks...
Parsing on run end hooks...
Warning: the surrogate_key macro now takes a single list argument instead of multiple string arguments. Support for multiple string arguments will be deprecated in a future release of dbt-utils. The logging.stg_dbt_audit_log model triggered this warning.
Warning: the surrogate_key macro now takes a single list argument instead of multiple string arguments. Support for multiple string arguments will be deprecated in a future release of dbt-utils. The logging.stg_dbt_model_deployments model triggered this warning.

Checklist

  • I have verified that these changes work locally
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)

@tayloramurphy
Copy link
Author

This looks ready to merge @clrcrl - tagging you because I have no idea if you're mentioned when a PR is opened 😄

@clrcrl
Copy link
Contributor

clrcrl commented Jul 27, 2020

Sure am — I get added as a CODEOWNER.

Copy link
Contributor

@clrcrl clrcrl left a comment

Choose a reason for hiding this comment

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

We use the exceptions.warn macro in a few other places too, what's your appetite like to update those error messages?

LMK (no pressure), and either way I'll kick off the tests

macros/sql/surrogate_key.sql Outdated Show resolved Hide resolved
@clrcrl
Copy link
Contributor

clrcrl commented Jul 27, 2020

Kicking off the tests now 🤞

@clrcrl
Copy link
Contributor

clrcrl commented Jul 27, 2020

ugh, that's an unrelated failure. Fixing it now

@clrcrl clrcrl changed the base branch from dev/0.18.x to main July 30, 2020 20:14
@clrcrl
Copy link
Contributor

clrcrl commented Jul 30, 2020

heh let's do this 😎

@clrcrl clrcrl merged commit 3fe982b into dbt-labs:main Jul 30, 2020
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.

2 participants