|
| 1 | +--- |
1 | 2 | version: 2 |
2 | 3 | models: |
3 | | - - name: orders |
4 | | - description: This table has basic information about orders, as well as some derived facts based on payments |
| 4 | + - name : orders |
| 5 | + description : This table has basic information about orders, as well as some derived facts based on payments |
5 | 6 |
|
6 | | - columns: |
7 | | - - name: order_id |
8 | | - tests: |
| 7 | + columns : |
| 8 | + - name : order_id |
| 9 | + tests : |
9 | 10 | - unique |
10 | 11 | - not_null |
11 | | - description: This is a unique identifier for an order |
12 | | - data_type: INTEGER |
13 | | - - name: customer_id |
14 | | - description: Foreign key to the customers table |
15 | | - tests: |
| 12 | + description : This is a unique identifier for an order |
| 13 | + data_type : INTEGER |
| 14 | + - name : customer_id |
| 15 | + description : Foreign key to the customers table |
| 16 | + tests : |
16 | 17 | - not_null |
17 | | - - relationships: |
18 | | - to: ref('customers') |
19 | | - field: customer_id |
| 18 | + - relationships : |
| 19 | + to : ref('customers') |
| 20 | + field : customer_id |
20 | 21 |
|
21 | | - data_type: INTEGER |
22 | | - - name: order_date |
23 | | - description: Date (UTC) that the order was placed |
24 | | - data_type: DATE |
25 | | - - name: status |
26 | | - tests: |
27 | | - - accepted_values: |
28 | | - values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] |
| 22 | + data_type : INTEGER |
| 23 | + - {name : order_date, description : Date (UTC) that the order was placed, data_type : DATE} |
| 24 | + - name : status |
| 25 | + tests : |
| 26 | + - accepted_values : |
| 27 | + values : ['placed', 'shipped', 'completed', 'return_pending', 'returned'] |
29 | 28 |
|
30 | | - description: '{{ doc("orders_status") }}' |
31 | | - data_type: VARCHAR |
32 | | - - name: credit_card_amount |
33 | | - description: Amount of the order (AUD) paid for by credit card |
34 | | - tests: |
| 29 | + description : '{{ doc("orders_status") }}' |
| 30 | + data_type : VARCHAR |
| 31 | + - name : credit_card_amount |
| 32 | + description : Amount of the order (AUD) paid for by credit card |
| 33 | + tests : |
35 | 34 | - not_null |
36 | 35 |
|
37 | | - data_type: DOUBLE |
38 | | - - name: coupon_amount |
39 | | - description: Amount of the order (AUD) paid for by coupon |
40 | | - tests: |
| 36 | + data_type : DOUBLE |
| 37 | + - name : coupon_amount |
| 38 | + description : Amount of the order (AUD) paid for by coupon |
| 39 | + tests : |
41 | 40 | - not_null |
42 | 41 |
|
43 | | - data_type: DOUBLE |
44 | | - - name: bank_transfer_amount |
45 | | - description: Amount of the order (AUD) paid for by bank transfer |
46 | | - tests: |
| 42 | + data_type : DOUBLE |
| 43 | + - name : bank_transfer_amount |
| 44 | + description : Amount of the order (AUD) paid for by bank transfer |
| 45 | + tests : |
47 | 46 | - not_null |
48 | 47 |
|
49 | | - data_type: DOUBLE |
50 | | - - name: gift_card_amount |
51 | | - description: Amount of the order (AUD) paid for by gift card |
52 | | - tests: |
| 48 | + data_type : DOUBLE |
| 49 | + - name : gift_card_amount |
| 50 | + description : Amount of the order (AUD) paid for by gift card |
| 51 | + tests : |
53 | 52 | - not_null |
54 | | - data_type: DOUBLE |
55 | | - - name: amount |
56 | | - description: Total amount (AUD) of the order |
57 | | - tests: |
| 53 | + data_type : DOUBLE |
| 54 | + - name : amount |
| 55 | + description : Total amount (AUD) of the order |
| 56 | + tests : |
58 | 57 | - not_null |
59 | | - data_type: DOUBLE |
| 58 | + data_type : DOUBLE |
0 commit comments