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] Quoting behavior for sources #10892

Closed
2 tasks done
peterallenwebb opened this issue Oct 21, 2024 · 1 comment · Fixed by #10905
Closed
2 tasks done

[Regression] Quoting behavior for sources #10892

peterallenwebb opened this issue Oct 21, 2024 · 1 comment · Fixed by #10905
Labels
bug Something isn't working quoting Issues related to dbt's quoting behavior regression

Comments

@peterallenwebb
Copy link
Contributor

peterallenwebb commented Oct 21, 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

In dbt-core 1.7 and earlier, quoting behavior for sources was not controlled by the quoting configuration in dbt_project.yml, but newer versions of dbt also apply those settings to sources.

In older versions of dbt, this was rendered without quotes around the schema name. The change seems to be unintentional, and we would like to return to the previous behavior.

Steps To Reproduce

# dbt_project.yml
quoting:
  schema: True
# models/sources.yml
sources:
  - name: <sourcename>
...

Create a model that references the source, and note that source(, ) is rendered in recent versions as:

with source as (

    select * from <database>."<schema>".<tablename>

)

We can work around with a source which specifically overrides this setting:

# models/sources.yml
sources:
  - name: <sourcename>
    quoting:
      schema: False
...

Relevant log output

.

Environment

- OS: Ubuntu/macos
- Python: 3.11
- dbt: 1.8.latest

Which database adapter are you using with dbt?

snowflake

Additional Context

No response

@peterallenwebb peterallenwebb added bug Something isn't working triage labels Oct 21, 2024
@peterallenwebb
Copy link
Contributor Author

@dbeatty10 dbeatty10 added quoting Issues related to dbt's quoting behavior regression and removed triage labels Oct 22, 2024
@dbeatty10 dbeatty10 changed the title [Bug] Regression in Quoting Behavior [Regression] Quoting behavior for sources Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quoting Issues related to dbt's quoting behavior regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants