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

[Regression] target.account has been changed to replace underscores with dashes #1286

Open
2 tasks done
mbdataminr opened this issue Dec 20, 2024 · 2 comments
Open
2 tasks done

Comments

@mbdataminr
Copy link

mbdataminr commented Dec 20, 2024

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When upgrading from dbt 1.8 to 1.9
{{ target.account }} is now replaces underscores with dashes. For example, if the target.account is set to sample_company, then the compiled code now generates sample-company.

If logic is based on this (eg, {% if target.account|lower == 'sample_account' %}), this change breaks existing code. This was not outlined in the release notes for upgrading dbt versions.

Expected Behavior

Expected that target.account would be compared to what is in the profiles.yml, not modified.

Steps To Reproduce

  1. Set account to a value with underscores (sample_company)
  2. Create a model with the code, eg:
    select '{{ target.account }}'
  3. Run model on versions 1.8 vs 1.9. 1.9 replaces target.account underscores with dashes.

Relevant log output

No response

Environment

- dbt: 1.9.1

Which database adapter are you using with dbt?

snowflake

Additional Context

No response

@mbdataminr mbdataminr added type:bug Something isn't working triage:product labels Dec 20, 2024
@dbeatty10 dbeatty10 changed the title [Bug] target.account has been changed to replace underscores with dashes [Bug] target.account has been changed to replace underscores with dashes Jan 10, 2025
@dbeatty10 dbeatty10 changed the title [Bug] target.account has been changed to replace underscores with dashes [Regression] target.account has been changed to replace underscores with dashes Jan 10, 2025
@dbeatty10
Copy link
Contributor

Thanks for reporting this @mbdataminr ! I'm going to transfer this to dbt-snowflake for further follow-up by another member of our team.

In the meantime, this appears related to #1068 / #1067 which is related to an issue related to the Snowflake Python driver for Python 3.11+.

Reading through the information in the links above, it looks like our preferred resolution would have been if the fix was within the Snowflake Python connector: snowflakedb/snowflake-connector-python#1839 (comment).

I'm sorry that this change breaks your existing code. I've opened dbt-labs/docs.getdbt.com#6759 to add a note about this change in the release notes and/or upgrade guide for v1.9.

@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Jan 10, 2025
@dbeatty10
Copy link
Contributor

Transferred from https://github.com/dbt-labs/dbt-core/issues/11174 to #1286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants