Describe the bug
When generating base models with table columns that are keywords, it does not escape them to the correct casing for the underlying source.
Steps to reproduce
Had a snowflake source table with a column name "ORDER". When generating the base models using codegen.create_base_models it did not escape the column, resulting in the generated output failing. In addition, as the column name was all uppercase, it was necessary to change the casing.
Expected results
If the underlying column was ORDER the name should be escape and match this case, i.e. not order, it should be "ORDER".
Actual results
Generates order.
Screenshots and log output
System information
**The contents of your packages.yml file:
packages:
- package: metaplane/dbt_expectations
version: [">=0.10.9", "<0.11.0"]
- package: dbt-labs/dbt_utils
version: 1.3.1
- package: dbt-labs/codegen
version: 0.13.1
Which database are you using dbt with?
The output of dbt --version:
The operating system you're using: Linux
**The output of python --version: Python 3.11.2
Additional context
Are you interested in contributing the fix?
Describe the bug
When generating base models with table columns that are keywords, it does not escape them to the correct casing for the underlying source.
Steps to reproduce
Had a snowflake source table with a column name "ORDER". When generating the base models using codegen.create_base_models it did not escape the column, resulting in the generated output failing. In addition, as the column name was all uppercase, it was necessary to change the casing.
Expected results
If the underlying column was
ORDERthe name should be escape and match this case, i.e. notorder, it should be"ORDER".Actual results
Generates
order.Screenshots and log output
System information
**The contents of your
packages.ymlfile:packages:
version: [">=0.10.9", "<0.11.0"]
version: 1.3.1
version: 0.13.1
Which database are you using dbt with?
The output of
dbt --version:The operating system you're using: Linux
**The output of
python --version: Python 3.11.2Additional context
Are you interested in contributing the fix?