calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros

Home Page:https://calogica.github.io/dbt-expectations/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Table columns names that contain spaces trigger runtime errors.

pulsation opened this issue · comments

Is this a new bug in dbt-expectations?

  • I believe this is a new bug in dbt-expectations
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Table columns names that contain spaces trigger runtime errors such as : Parser Error: syntax error at or near "Index".

Expected Behavior

While it's weird to have table columns containing spaces, they should not trigger errors. Enclosing table column names with "s may fix this.

Steps To Reproduce

Add a dbt_expectations.expect_column_values_to_not_be_in_set on a column that contains one or more spaces.

Relevant log output

18:15:16 Runtime Error in test dbt_expectations_expect_column_values_to_not_be_in_set_volumes_2008_Price_Index__ERR__NA______blank_ (models/schema.yml)
Parser Error: syntax error at or near "Index"

Environment

- OS: MacOS 12.7.3
- Python: 3.12.2
- dbt: 1.7.9
- dbt-expectations: 0.10.3

Which database adapter are you using with dbt?

DuckDB, but Postgres also has this problem.