File tree Expand file tree Collapse file tree 9 files changed +360
-0
lines changed Expand file tree Collapse file tree 9 files changed +360
-0
lines changed Original file line number Diff line number Diff line change
1
+ sources :
2
+ - name : customers
3
+ columns :
4
+ - name : customer_id
5
+ description : " "
6
+ data_type : INTEGER
7
+ tests : []
8
+ - name : first_name
9
+ description : " "
10
+ data_type : VARCHAR
11
+ tests : []
12
+ - name : last_name
13
+ description : " "
14
+ data_type : VARCHAR
15
+ tests : []
16
+ - name : first_order
17
+ description : " "
18
+ data_type : DATE
19
+ tests : []
20
+ - name : most_recent_order
21
+ description : " "
22
+ data_type : DATE
23
+ tests : []
24
+ - name : number_of_orders
25
+ description : " "
26
+ data_type : BIGINT
27
+ tests : []
28
+ - name : customer_lifetime_value
29
+ description : " "
30
+ data_type : DOUBLE
31
+ tests : []
32
+ - name : orders
33
+ columns :
34
+ - name : order_id
35
+ description : " "
36
+ data_type : INTEGER
37
+ tests : []
38
+ - name : customer_id
39
+ description : " "
40
+ data_type : INTEGER
41
+ tests : []
42
+ - name : order_date
43
+ description : " "
44
+ data_type : DATE
45
+ tests : []
46
+ - name : status
47
+ description : " "
48
+ data_type : VARCHAR
49
+ tests : []
50
+ - name : credit_card_amount
51
+ description : " "
52
+ data_type : DOUBLE
53
+ tests : []
54
+ - name : coupon_amount
55
+ description : " "
56
+ data_type : DOUBLE
57
+ tests : []
58
+ - name : bank_transfer_amount
59
+ description : " "
60
+ data_type : DOUBLE
61
+ tests : []
62
+ - name : gift_card_amount
63
+ description : " "
64
+ data_type : DOUBLE
65
+ tests : []
66
+ - name : amount
67
+ description : " "
68
+ data_type : DOUBLE
69
+ tests : []
70
+ - name : raw_customers
71
+ columns :
72
+ - name : id
73
+ description : " "
74
+ data_type : INTEGER
75
+ tests : []
76
+ - name : first_name
77
+ description : " "
78
+ data_type : VARCHAR
79
+ tests : []
80
+ - name : last_name
81
+ description : " "
82
+ data_type : VARCHAR
83
+ tests : []
84
+ - name : raw_orders
85
+ columns :
86
+ - name : id
87
+ description : " "
88
+ data_type : INTEGER
89
+ tests : []
90
+ - name : user_id
91
+ description : " "
92
+ data_type : INTEGER
93
+ tests : []
94
+ - name : order_date
95
+ description : " "
96
+ data_type : DATE
97
+ tests : []
98
+ - name : status
99
+ description : " "
100
+ data_type : VARCHAR
101
+ tests : []
102
+ - name : raw_payments
103
+ columns :
104
+ - name : id
105
+ description : " "
106
+ data_type : INTEGER
107
+ tests : []
108
+ - name : order_id
109
+ description : " "
110
+ data_type : INTEGER
111
+ tests : []
112
+ - name : payment_method
113
+ description : " "
114
+ data_type : VARCHAR
115
+ tests : []
116
+ - name : amount
117
+ description : " "
118
+ data_type : INTEGER
119
+ tests : []
120
+ - name : stg_customers
121
+ columns :
122
+ - name : customer_id
123
+ description : " "
124
+ data_type : INTEGER
125
+ tests : []
126
+ - name : first_name
127
+ description : " "
128
+ data_type : VARCHAR
129
+ tests : []
130
+ - name : last_name
131
+ description : " "
132
+ data_type : VARCHAR
133
+ tests : []
134
+ - name : stg_orders
135
+ columns :
136
+ - name : order_id
137
+ description : " "
138
+ data_type : INTEGER
139
+ tests : []
140
+ - name : customer_id
141
+ description : " "
142
+ data_type : INTEGER
143
+ tests : []
144
+ - name : order_date
145
+ description : " "
146
+ data_type : DATE
147
+ tests : []
148
+ - name : status
149
+ description : " "
150
+ data_type : VARCHAR
151
+ tests : []
152
+ - name : stg_payments
153
+ columns :
154
+ - name : payment_id
155
+ description : " "
156
+ data_type : INTEGER
157
+ tests : []
158
+ - name : order_id
159
+ description : " "
160
+ data_type : INTEGER
161
+ tests : []
162
+ - name : payment_method
163
+ description : " "
164
+ data_type : VARCHAR
165
+ tests : []
166
+ - name : amount
167
+ description : " "
168
+ data_type : DOUBLE
169
+ tests : []
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' customers' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- datetimes
13
+ first_order as first_order,
14
+ most_recent_order as most_recent_order,
15
+
16
+ -- numbers
17
+ customer_id as customer_id,
18
+ number_of_orders as number_of_orders,
19
+
20
+ -- text
21
+ first_name as first_name,
22
+ last_name as last_name,
23
+
24
+ from source
25
+ )
26
+
27
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' orders' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- datetimes
13
+ order_date as order_date,
14
+
15
+ -- numbers
16
+ order_id as order_id,
17
+ customer_id as customer_id,
18
+
19
+ -- text
20
+ status as status,
21
+
22
+ from source
23
+ )
24
+
25
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' raw_customers' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- numbers
13
+ id as id,
14
+
15
+ -- text
16
+ first_name as first_name,
17
+ last_name as last_name,
18
+
19
+ from source
20
+ )
21
+
22
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' raw_orders' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- datetimes
13
+ order_date as order_date,
14
+
15
+ -- numbers
16
+ id as id,
17
+ user_id as user_id,
18
+
19
+ -- text
20
+ status as status,
21
+
22
+ from source
23
+ )
24
+
25
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' raw_payments' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- numbers
13
+ id as id,
14
+ order_id as order_id,
15
+ amount as amount,
16
+
17
+ -- text
18
+ payment_method as payment_method,
19
+
20
+ from source
21
+ )
22
+
23
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' stg_customers' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- numbers
13
+ customer_id as customer_id,
14
+
15
+ -- text
16
+ first_name as first_name,
17
+ last_name as last_name,
18
+
19
+ from source
20
+ )
21
+
22
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' stg_orders' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- datetimes
13
+ order_date as order_date,
14
+
15
+ -- numbers
16
+ order_id as order_id,
17
+ customer_id as customer_id,
18
+
19
+ -- text
20
+ status as status,
21
+
22
+ from source
23
+ )
24
+
25
+ select * from renamed
Original file line number Diff line number Diff line change
1
+ with
2
+
3
+ source as (
4
+
5
+ select * from {{ ref(' stg_payments' ) }}
6
+
7
+ ),
8
+
9
+ renamed as (
10
+
11
+ select
12
+ -- numbers
13
+ payment_id as payment_id,
14
+ order_id as order_id,
15
+
16
+ -- text
17
+ payment_method as payment_method,
18
+
19
+ from source
20
+ )
21
+
22
+ select * from renamed
You can’t perform that action at this time.
0 commit comments