Hi,
I’m new to dbt, I’m using the jaffle_shop demo.
I ran it fine, now I want to specify the schema now for each model.
My schema.yml file looks like this:
How do I set the schema ?
Thanks Pierre !
version: 2
models:
-
name: stg_customers
columns:- name: customer_id
tests:- unique
- not_null
- name: customer_id
-
name: stg_orders
columns:- name: order_id
tests:- unique
- not_null
- name: status
tests:- accepted_values:
values: [‘placed’, ‘shipped’, ‘completed’, ‘return_pending’, ‘returned’]
- accepted_values:
- name: order_id
-
name: stg_payments
columns:- name: payment_id
tests:- unique
- not_null
- name: payment_method
tests:- accepted_values:
values: [‘credit_card’, ‘coupon’, ‘bank_transfer’, ‘gift_card’]
- accepted_values:
- name: payment_id