Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] expect_column_values_to_be_of_type is not able to test properly #320

Open
3 tasks done
CarMoreno opened this issue Oct 22, 2024 · 0 comments
Open
3 tasks done

Comments

@CarMoreno
Copy link

CarMoreno commented Oct 22, 2024

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

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.

  • Postgres (dbt-postgres==1.8.2)
  • Snowflake
  • BigQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant