forked from dbt-labs/jaffle_shop_duckdb
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrecce.yml
More file actions
40 lines (39 loc) · 1.31 KB
/
recce.yml
File metadata and controls
40 lines (39 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# [Optional] GitHub settings
github:
repo: "DataRecce/jaffle_shop_duckdb"
# Recce Preset Checks
checks:
- name: Model schema of customers, orders and modified nodes
description: The schema of customers should not be changed
type: schema_diff
params:
select: customers orders state:modified
- name: Row count of customers, orders and modified table model
description: The row count of customers and order should not be changed
type: row_count_diff
params:
select: customers orders state:modified,config.materialized:table
- name: Value diff of customers
description: The customer_lifetime_value in customers should be 100% matched
type: value_diff
params:
model: customers
primary_key: customer_id
columns:
- customer_id
- customer_lifetime_value
- name: Query diff of customers avg lifetime value
description: The average of customer_lifetime_value should not be changed
type: query_diff
params:
sql_template: |-
SELECT
DATE_TRUNC('week', first_order) AS first_order_week,
AVG(customer_lifetime_value) AS avg_lifetime_value
FROM
{{ ref("customers") }}
WHERE first_order is not NULL
GROUP BY
first_order_week
ORDER BY
first_order_week;