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

dbt quoting does not work as expected #497

Open
FlorianVc opened this issue Apr 25, 2024 · 1 comment
Open

dbt quoting does not work as expected #497

FlorianVc opened this issue Apr 25, 2024 · 1 comment

Comments

@FlorianVc
Copy link

The quoting for msft sql not working. Dbt use double quotes when the config quoting is turned on but ms sql or tsql use square brackets.

I need quoting for databases and table. Our table or database prefix is sometimes a number like 101_Customers .

Example:
dbt config:

quoting:
  database: true
  schema: true
  identifier: true

The dbt compilation result:
SELECT * FROM "101_supplier"."core"."supplier"

What I expected:
SELECT * FROM [101_supplier].[core].[supplier]

Question:
Is there a way to configure the quoting for database, schema and identifier with square brackets. Or this issue a topic for the dbt core team?

Additional context
I found a core issue with similar problems: link

@hernanparra
Copy link

The double quotes work fine in MS SQL. Did you try running the query? It works fine with tables that start with numbers. I don't have servers named like that to try.

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

No branches or pull requests

2 participants