Skip to content

Commit 478c3a3

Browse files
committed
[Infra] DRC-359 Add preset checks for Recce CI
Signed-off-by: Kent Huang <[email protected]>
1 parent f34c241 commit 478c3a3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

recce.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# [Optional] GitHub settings
2+
github:
3+
repo: "DataRecce/jaffle_shop_duckdb"
4+
5+
# Recce Preset Checks
6+
checks:
7+
- name: Model schema of customers
8+
description: The schema of customers should not be changed
9+
type: schema_diff
10+
params:
11+
node_id: model.jaffle_shop.customers
12+
- name: Model schema of orders
13+
description: The schema of orders should not be changed
14+
type: schema_diff
15+
params:
16+
node_id: model.jaffle_shop.orders
17+
- name: Row count of customers and orders models
18+
description: The row count of customers and order should not be changed
19+
type: row_count_diff
20+
params:
21+
node_names:
22+
- customers
23+
- orders
24+
- name: Value diff of customers
25+
description: The customer_lifetime_value in customers should be 100% matched
26+
type: value_diff
27+
params:
28+
model: customers
29+
primary_key: customer_id
30+
columns:
31+
- customer_id
32+
- customer_lifetime_value
33+
- name: Query diff of customers avg lifetime value
34+
description: The average of customer_lifetime_value should not be changed
35+
type: query_diff
36+
params:
37+
sql_template: |-
38+
SELECT
39+
DATE_TRUNC('week', first_order) AS first_order_week,
40+
AVG(customer_lifetime_value) AS avg_lifetime_value
41+
FROM
42+
{{ ref("customers") }}
43+
WHERE first_order is not NULL
44+
GROUP BY
45+
first_order_week
46+
ORDER BY
47+
first_order_week;

0 commit comments

Comments
 (0)