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] I cant add severity: WARN

YevgenyLevi 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

My code:

tests:

  • dbt_expectations.expect_column_values_to_be_between:
    min_value: 300
    max_value: 850
    severity: WARN

Expected Behavior

Add severity WARN

Steps To Reproduce

Relevant log output

test definition dictionary must have exactly one key, got [('dbt_expectations.expect_column_values_to_be_between', {'min_value': 300, 'max_value': 850}), ('severity', 'WARN')] instead (2 keys)

Environment

TEST

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

Which database adapter are you using with dbt?

Postgres

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

  • Postgres
  • Snowflake
  • BigQuery

Additional Context

Hi, this is actually not an issue with severity, you need to indent all keys:

- dbt_expectations.expect_column_values_to_be_between:
    min_value: 300
    max_value: 850
    severity: WARN

See this example.

Yes, actually now I see that it works, I don't know what I changed in my indentation, looks the same :)
thanks!