automate-dv
automate-dv copied to clipboard
[BUG] Column Escaping Doesn't Work with `NOT` Well
Describe the bug
Now dbtvault wraps all the columns with quotes, but not
would be in the quotes as well.
Versions
dbt: 1.0.4 dbtvault: 0.8.2
To Reproduce
{{
dbtvault.stage(
source_model = "source_model",
hashed_columns = {
"hk_a": "id",
"a_hashdiff": {
"is_hashdiff": true,
"columns": [
"a",
]
}
},
derived_columns = {
"derived_column_a": "not column_a",
},
)
}}
The compiled SQL would be like:
derived_columns AS (
SELECT
"not column_a" AS "eff_flag",
FROM source_data
),
Expected behavior
The not
should be outside the quotes like:
derived_columns AS (
SELECT
not "column_a" AS "eff_flag",
FROM source_data
),
Screenshots If applicable, add screenshots to help explain your problem.
Log files If applicable, provide dbt log files which include the problem.
Additional context Add any other context about the problem here.