-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathschema.yml
More file actions
107 lines (77 loc) · 3.07 KB
/
schema.yml
File metadata and controls
107 lines (77 loc) · 3.07 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: 2
models:
- name: customers
description: This table has basic information about a customer, as well as some derived facts based on a customer's orders
config:
tags: ["PII"]
columns:
- name: customer_id
description: This is a unique identifier for a customer
- name: first_name
description: Customer's first name. PII.
- name: last_name
description: Customer's last name. PII.
- name: first_order
description: Date (UTC) of a customer's first order
- name: most_recent_order
description: Date (UTC) of a customer's most recent order
- name: number_of_orders
description: Count of the number of orders a customer has placed
- name: customer_lifetime_value
description: Total value (AUD) of a customer's orders
- name: customer_email
description: Customer's email. PII.
- name: signup_date
description: Date (UTC) of a customer's signup to the online shop.
- name: orders
description: This table has basic information about orders, as well as some derived facts based on payments
config:
tags: ["finance"]
columns:
- name: order_id
description: This is a unique identifier for an order
- name: customer_id
description: Foreign key to the customers table
- name: order_date
description: Date (UTC) that the order was placed
- name: status
description: '{{ doc("orders_status") }}'
- name: amount
description: Total amount (AUD) of the order
- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
tests:
- elementary.schema_changes:
config:
severity: error
meta:
description: Checks for schema changes against an existing baseline
- name: returned_orders
description: This table contains all of the returned orders
config:
tags: ["finance"]
columns:
- name: order_id
description: This is a unique identifier for an order
- name: customer_id
description: Foreign key to the customers table
- name: order_date
description: Date (UTC) that the order was placed
- name: status
description: '{{ doc("orders_status") }}'
- name: amount
description: Total amount (AUD) of the order
- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card