dbt-expectations
dbt-expectations copied to clipboard
[BUG] expect_column_values_to_be_of_type is not able to test properly
Is this a new bug in dbt-expectations?
- [x] I believe this is a new bug in dbt-expectations
- [x] I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
I am trying to test a few columns using expect_column_values_to_be_of_type
, once I set the properties.yml
file I get a weird syntax error:
Database Error in test dbt_expectations_expect_column_values_to_be_of_type_valid_chemical_data_mass__numeric (models/chebi_ontology/properties.yml)
syntax error at or near ")"
LINE 10: ),
I was trying to run the SQL output from dbt_expectations and I got the same error. This is the content of the properties.yml
file:
- name: valid_chemical_data
columns:
- name: id
data_tests:
- unique
- not_null
- name: compound_id
data_tests:
- unique
- not_null
- name: mass
data_tests:
- dbt_expectations.expect_column_values_to_be_of_type:
column_type: numeric #this does not work!
Dbt model is materialized as a Materalized view
but I think it does not matter..
Environment
- OS: MacOS
- Python: 3.12
- dbt: 1.8.2
- dbt-expectations: 0.10.4
Which database adapter are you using with dbt?
Note: dbt-expectations currently does not support database adapters other than the ones listed below.
- [x] Postgres (
dbt-postgres==1.8.2
) - Snowflake
- BigQuery