duckdb/dbt-duckdb

Handle column names with spaces

sdebruyn opened this issue · 2 comments

I know it's a bad practice, but you can't always help it that is how you get your source data :)

If column names have spaces and you define tests for them, then you get errors.

E.g.

          - name: "van tijdstip"
            type: time
            description: Start time of the quarter
            tests:
              - not_null
20:24:34    Parser Error: syntax error at or near "tijdstip"
20:24:34    LINE 15: where van tijdstip is null

Probably need to surround all column names with double quotes.

You should be able to quote it via: https://docs.getdbt.com/reference/resource-properties/quote

LMK if that doesn't do the trick!

That works, thanks!