Initial publish of dbt_f2dq (f2dq) package v0.12.1.
Clean package repo for Gitea installs via packages.yml git URL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{{
|
||||
config(
|
||||
f2dq_monitored=true,
|
||||
f2dq_time_filter='creation_time',
|
||||
f2dq_anomaly_detector={'name': 'z_score', 'threshold': 0.5},
|
||||
materialized='table',
|
||||
tags=['testtag']
|
||||
)
|
||||
}}
|
||||
select *
|
||||
from {{ ref('sample_with_anomaly') }}
|
||||
where event_type = 'buy'
|
||||
@@ -0,0 +1,49 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: buy_events
|
||||
tests:
|
||||
- f2dq.assert_in_range:
|
||||
metric: row_count
|
||||
min_value: 0
|
||||
max_value: 10
|
||||
|
||||
- f2dq.assert_equal:
|
||||
metric: row_count
|
||||
value: 1
|
||||
|
||||
- f2dq.assert_false:
|
||||
metric: freshness
|
||||
expression: value is null
|
||||
|
||||
- f2dq.assert_greater_equal:
|
||||
metric: my_distinct_table_rows
|
||||
value: 10
|
||||
|
||||
columns:
|
||||
- name: value1
|
||||
tests:
|
||||
- f2dq.assert_in_range:
|
||||
metric: nulls_percent
|
||||
min_value: 0
|
||||
max_value: 10
|
||||
|
||||
- f2dq.assert_true:
|
||||
metric: nulls_percent
|
||||
expression: value = 0
|
||||
|
||||
- f2dq.assert_less:
|
||||
metric: min
|
||||
value: 100
|
||||
condition: time_window_start = '2021-05-02'
|
||||
|
||||
- f2dq.assert_less_equal:
|
||||
metric: min
|
||||
value: 107
|
||||
|
||||
- name: value2
|
||||
tests:
|
||||
- f2dq.assert_greater_equal:
|
||||
metric: min
|
||||
value: 200
|
||||
condition: time_window_start = '2021-05-02'
|
||||
Reference in New Issue
Block a user