diff --git a/models/schema.yml b/models/schema.yml index ff0e323b3..5cc68ade8 100644 --- a/models/schema.yml +++ b/models/schema.yml @@ -10,6 +10,9 @@ models: - name: customer_id description: This is a unique identifier for a customer + data_tests: + - unique + - not_null - name: first_name description: Customer's first name. PII. @@ -43,9 +46,17 @@ models: - name: order_id description: This is a unique identifier for an order + data_tests: + - unique + - not_null - name: customer_id description: Foreign key to the customers table + data_tests: + - relationships: + arguments: + to: ref('customers') + field: customer_id - name: order_date description: Date (UTC) that the order was placed @@ -76,9 +87,16 @@ models: - name: order_id description: This is a unique identifier for an order + data_tests: + - unique - name: customer_id description: Foreign key to the customers table + data_tests: + - relationships: + arguments: + to: ref('customers') + field: customer_id - name: order_date description: Date (UTC) that the order was placed diff --git a/models/staging/schema.yml b/models/staging/schema.yml index 628a98f6e..5d57ade30 100644 --- a/models/staging/schema.yml +++ b/models/staging/schema.yml @@ -7,11 +7,17 @@ models: columns: - name: customer_id + data_tests: + - unique + - not_null - name: stg_orders config: tags: ["staging", "finance"] columns: - name: order_id + data_tests: + - unique + - not_null - name: status - name: stg_payments @@ -19,6 +25,9 @@ models: tags: ["staging", "finance"] columns: - name: payment_id + data_tests: + - unique + - not_null - name: payment_method - name: stg_signups @@ -26,4 +35,7 @@ models: tags: ["staging", "PII"] columns: - name: signup_id + data_tests: + - unique + - not_null - name: customer_email