calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros
https://calogica.github.io/dbt-expectations/
Apache License 2.0
989 stars 120 forks source link

[BUG] The quote: parameter in the model .yaml breaks the expect_column_to_exist() macro. #285

Open jcoombes opened 9 months ago

jcoombes commented 9 months ago

Is this a new bug in dbt-expectations?

Current Behavior

When the model.yml has a column field which specifies quote: true - this macro returns non-zero (one) row, even though other tests pass e.g. not_null.

Expected Behavior

When the model.yml has a column field which specified quote: true - this macro returns zero rows if the column exists and non-zero rows if the column doesn't exist.

Steps To Reproduce

Postgres database column named with SCREAMING_SNAKE_CASE model.yaml specifies the quote: true parameter model.yaml specifies the tests: dbt_expectations.expect_column_to_exist and not_null

not_null passes, expect_column_to_exist fails.

Relevant log output

None

Environment

- OS:
- Python:
- dbt:
- dbt-expectations:

Which database adapter are you using with dbt?

dbt-postgres

Note: dbt-expectations currently does not support database adapters other than the ones listed below.

Additional Context