Comments (6)
@clausherther Thank you! Of course the answer is to read the docs. Adding error_if
converts the severity to a "warn", which you can make pass by adding a warn_if
setting.
from dbt-expectations.
I could solve my own problem.
- name: name_tracker
tests:
- dbt_expectations.expect_column_values_to_be_in_set:
value_set: ["ssc", "sp2", "cf", "ssc1"]
severity: warn
I hope it might help others.
from dbt-expectations.
@rfortmann-ewolff glad you solved it! I think the +
syntax in dbt is for project config settings only, but not sure.
from dbt-expectations.
Apologies if this is addressed elsewhere, but this looks like the closest issue. For the expect_grouped_row_values_to_have_recent_data test, I have one group that will not have recent data for valid reasons. Currently the test fails, saying Got 1 result, configured to fail if != 0
. It would be great if I could specify fail if result > n.
from dbt-expectations.
Hi @seanpwlms ! I think this might actually be supported in the new dbt test configs:
https://docs.getdbt.com/reference/test-configs
I haven't played around with this, but I think the relevant config is error_if
https://docs.getdbt.com/reference/resource-configs/severity
Would love to hear if this is works for you and how you ended up using it!
from dbt-expectations.
I tried using the severity
and the warn_if
arguments but dbt encounter an error:
- name: name_tracker
tests:
- dbt_expectations.expect_column_values_to_be_in_set:
value_set: ["ssc", "sp2", "cf", "ssc1"]
+severity: warn
Running with dbt=0.20.0
Encountered an error:
Compilation Error
Invalid test config given in models/snowplow/sources_in_snowplow.yml:
test definition dictionary must have exactly one key, got [('not_null', None), ('+severity', 'warn')] instead (2 keys)
and
- name: name_tracker
tests:
- dbt_expectations.expect_column_values_to_be_in_set:
value_set: ["ssc", "sp2", "cf", "ssc1"]
+warn_if: "!=0"
Running with dbt=0.20.0
Encountered an error:
Compilation Error in test dbt_expectations_source_expect_column_values_to_be_in_set_snowplow_events__0__name_tracker__ssc__sp2__cf__ssc1 (models/snowplow/sources_in_snowplow.yml)
macro 'dbt_macro__test_expect_column_values_to_be_in_set' takes no keyword argument '+warn_if'
Any idea what the problem could be ?
from dbt-expectations.
Related Issues (20)
- Update calogica/dbt_date version. HOT 1
- [Feature Request] Add Spark Support
- [Feature Request] Test row-on-row percent change
- [Feature Request] HOT 2
- [Feature Request] Update the package version for dbt-date HOT 3
- [BUG] The quote: parameter in the model .yaml breaks the expect_column_to_exist() macro.
- [Feature Request] Add suport for AWS Athena HOT 1
- [BUG] Invalid SQL compiled when extracting relation columns from duckdb adapter
- [Feature Request] Improving Data Validation Output HOT 1
- [BUG] expect_multicolumn_sum_to_equal fails if sum_total is another column
- Trino support
- [BUG] expect_row_values_to_have_data_for_every_n_datepart can fail if model has never been run HOT 3
- [Feature Request] Add variable for row_cnt for expect_row_values_to_have_data_for_every_n_datepart test
- [BUG] With expect expect_column_values_to_be_of_type test
- [BUG] expect_select_column_values_to_be_unique_within_record Doesn't Allow for Different Data Types
- [BUG] Table columns names that contain spaces trigger runtime errors.
- Improve performance by moving to count(1) instead of count(*)
- [BUG] expect_table_aggregation_to_equal_other_table doesn't work with dates HOT 1
- expect_column_proportion_of_unique_values_to_be_between throwing a compilation error HOT 3
- [Documentation] Small spelling error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-expectations.