|
9 | 9 | node_id, |
10 | 10 | query_completed_at, |
11 | 11 | rows_affected, |
12 | | - schema, |
| 12 | + "schema", |
13 | 13 | status, |
14 | 14 | thread_id, |
15 | 15 | total_node_runtime, |
|
34 | 34 | {% endset %} |
35 | 35 |
|
36 | 36 | {{ log("Migrating model_executions", info=True) }} |
37 | | - {%- call statement(auto_begin=True) -%} |
38 | | - {{ migrate_model_executions }} |
39 | | - {%- endcall -%} |
| 37 | + {%- call statement(auto_begin=True) -%} {{ migrate_model_executions }} {%- endcall -%} |
40 | 38 |
|
41 | 39 | {% set migrate_tests %} |
42 | 40 | insert into {{new_database}}.{{new_schema}}.tests ( |
|
62 | 60 | {% endset %} |
63 | 61 |
|
64 | 62 | {{ log("Migrating tests", info=True) }} |
65 | | - {%- call statement(auto_begin=True) -%} |
66 | | - {{ migrate_tests }} |
67 | | - {%- endcall -%} |
| 63 | + {%- call statement(auto_begin=True) -%} {{ migrate_tests }} {%- endcall -%} |
68 | 64 |
|
69 | 65 | {% set migrate_test_executions %} |
70 | 66 | insert into {{new_database}}.{{new_schema}}.test_executions ( |
|
96 | 92 | {% endset %} |
97 | 93 |
|
98 | 94 | {{ log("Migrating test_executions", info=True) }} |
99 | | - {%- call statement(auto_begin=True) -%} |
100 | | - {{ migrate_test_executions }} |
101 | | - {%- endcall -%} |
| 95 | + {%- call statement(auto_begin=True) -%} {{ migrate_test_executions }} {%- endcall -%} |
102 | 96 |
|
103 | 97 | {% set migrate_models %} |
104 | 98 | insert into {{new_database}}.{{new_schema}}.models ( |
105 | 99 | checksum, |
106 | 100 | command_invocation_id, |
107 | | - database, |
| 101 | + "database", |
108 | 102 | depends_on_nodes, |
109 | 103 | materialization, |
110 | 104 | name, |
111 | 105 | node_id, |
112 | 106 | package_name, |
113 | 107 | path, |
114 | | - schema, |
| 108 | + "schema", |
115 | 109 | run_started_at |
116 | 110 | ) |
117 | 111 | select |
|
130 | 124 | {% endset %} |
131 | 125 |
|
132 | 126 | {{ log("Migrating models", info=True) }} |
133 | | - {%- call statement(auto_begin=True) -%} |
134 | | - {{ migrate_models }} |
135 | | - {%- endcall -%} |
| 127 | + {%- call statement(auto_begin=True) -%} {{ migrate_models }} {%- endcall -%} |
136 | 128 |
|
137 | 129 | {% set migrate_seeds %} |
138 | 130 | insert into {{new_database}}.{{new_schema}}.seeds ( |
139 | 131 | checksum, |
140 | 132 | command_invocation_id, |
141 | | - database, |
| 133 | + "database", |
142 | 134 | name, |
143 | 135 | node_id, |
144 | 136 | package_name, |
145 | 137 | path, |
146 | | - schema, |
| 138 | + "schema", |
147 | 139 | run_started_at |
148 | 140 | ) |
149 | 141 | select |
|
160 | 152 | {% endset %} |
161 | 153 |
|
162 | 154 | {{ log("Migrating seeds", info=True) }} |
163 | | - {%- call statement(auto_begin=True) -%} |
164 | | - {{ migrate_seeds }} |
165 | | - {%- endcall -%} |
| 155 | + {%- call statement(auto_begin=True) -%} {{ migrate_seeds }} {%- endcall -%} |
166 | 156 |
|
167 | 157 | {% set migrate_seed_executions %} |
168 | 158 | insert into {{new_database}}.{{new_schema}}.seed_executions ( |
|
173 | 163 | node_id, |
174 | 164 | query_completed_at, |
175 | 165 | rows_affected, |
176 | | - schema, |
| 166 | + "schema", |
177 | 167 | status, |
178 | 168 | thread_id, |
179 | 169 | total_node_runtime, |
|
198 | 188 | {% endset %} |
199 | 189 |
|
200 | 190 | {{ log("Migrating seed_executions", info=True) }} |
201 | | - {%- call statement(auto_begin=True) -%} |
202 | | - {{ migrate_seed_executions }} |
203 | | - {%- endcall -%} |
| 191 | + {%- call statement(auto_begin=True) -%} {{ migrate_seed_executions }} {%- endcall -%} |
204 | 192 |
|
205 | 193 | {% set migrate_exposures %} |
206 | 194 | insert into {{new_database}}.{{new_schema}}.exposures ( |
|
235 | 223 | {% endset %} |
236 | 224 |
|
237 | 225 | {{ log("Migrating exposures", info=True) }} |
238 | | - {%- call statement(auto_begin=True) -%} |
239 | | - {{ migrate_exposures }} |
240 | | - {%- endcall -%} |
| 226 | + {%- call statement(auto_begin=True) -%} {{ migrate_exposures }} {%- endcall -%} |
241 | 227 |
|
242 | 228 | {% set migrate_snapshots %} |
243 | 229 | insert into {{new_database}}.{{new_schema}}.snapshots ( |
244 | 230 | checksum, |
245 | 231 | command_invocation_id, |
246 | | - database, |
| 232 | + "database", |
247 | 233 | depends_on_nodes, |
248 | 234 | name, |
249 | 235 | node_id, |
250 | 236 | package_name, |
251 | 237 | path, |
252 | | - schema, |
| 238 | + "schema", |
253 | 239 | strategy, |
254 | 240 | run_started_at |
255 | 241 | ) |
|
269 | 255 | {% endset %} |
270 | 256 |
|
271 | 257 | {{ log("Migrating snapshots", info=True) }} |
272 | | - {%- call statement(auto_begin=True) -%} |
273 | | - {{ migrate_snapshots }} |
274 | | - {%- endcall -%} |
| 258 | + {%- call statement(auto_begin=True) -%} {{ migrate_snapshots }} {%- endcall -%} |
275 | 259 |
|
276 | 260 | {% set migrate_snapshot_executions %} |
277 | 261 | insert into {{new_database}}.{{new_schema}}.snapshot_executions ( |
|
282 | 266 | node_id, |
283 | 267 | query_completed_at, |
284 | 268 | rows_affected, |
285 | | - schema, |
| 269 | + "schema", |
286 | 270 | status, |
287 | 271 | thread_id, |
288 | 272 | total_node_runtime, |
|
307 | 291 | {% endset %} |
308 | 292 |
|
309 | 293 | {{ log("Migrating snapshot_executions", info=True) }} |
310 | | - {%- call statement(auto_begin=True) -%} |
311 | | - {{ migrate_snapshot_executions }} |
312 | | - {%- endcall -%} |
| 294 | + {%- call statement(auto_begin=True) -%} {{ migrate_snapshot_executions }} {%- endcall -%} |
313 | 295 |
|
314 | 296 | {% set migrate_sources %} |
315 | 297 | insert into {{new_database}}.{{new_schema}}.sources ( |
316 | 298 | command_invocation_id, |
317 | | - database, |
| 299 | + "database", |
318 | 300 | freshness, |
319 | 301 | identifier, |
320 | 302 | loaded_at_field, |
321 | 303 | loader, |
322 | 304 | name, |
323 | 305 | node_id, |
324 | | - schema, |
| 306 | + "schema", |
325 | 307 | source_name, |
326 | 308 | run_started_at |
327 | 309 | ) |
|
341 | 323 | {% endset %} |
342 | 324 |
|
343 | 325 | {{ log("Migrating sources", info=True) }} |
344 | | - {%- call statement(auto_begin=True) -%} |
345 | | - {{ migrate_sources }} |
346 | | - {%- endcall -%} |
| 326 | + {%- call statement(auto_begin=True) -%} {{ migrate_sources }} {%- endcall -%} |
347 | 327 |
|
348 | 328 | {{ log("Migration complete. You can now safely delete any data from before 1.0.0", info=True) }} |
349 | 329 | {%- endmacro -%} |
| 330 | + |
0 commit comments