How do you modify a project-level quoting policy?

I have a source table called COLUMN in my Snowflake database. I didn’t name it! :wink:

But I do have to select from it. I’ve got quoting turned off in my project file. Is there a way to reference the COLUMN table through the source or do I have to hard-code the quoted name?

Hey @trevor - check out the docs on source table quoting here. I think you could probably do something like

sources: 
  - name: my_source:
    tables:
      - name: COLUMN
        quoting:
          identifier: true

Then in a model, you should be able to just do:

select * from {{ source('my_source', 'COLUMN') }}

Bonus points

It’s kind of not-fun to have to write out {{ source('my_source', 'COLUMN') }} with COLUMN in all caps. Instead of doing that, you could specify an identifier for dbt to use for the source, while still referencing it by its name.

sources: 
  - name: my_source:
    tables:
      - name: column
        identifier: COLUMN
        quoting:
          identifier: true

If you set up your source like that, you can reference it with:

select * from {{ source('my_source', 'column') }}

-- Compiles to:
select * from my_source."COLUMN"

This is genius. I went for the bonus points. Thank you. I just tried it out and it works great.