|
7 | 7 | {%- macro replace_placeholder_with_filter(core_sql, timestamp_field, start_timestamp, stop_timestamp, offset, period) -%}
|
8 | 8 |
|
9 | 9 | {% set macro = adapter.dispatch('replace_placeholder_with_filter',
|
10 |
| - packages = ['dbtvault'])(core_sql=core_sql, |
11 |
| - timestamp_field=timestamp_field, |
12 |
| - start_timestamp=start_timestamp, |
13 |
| - stop_timestamp=stop_timestamp, |
14 |
| - offset=offset, |
15 |
| - period=period) %} |
| 10 | + packages = var('adapter_packages', ['dbtvault']))(core_sql=core_sql, |
| 11 | + timestamp_field=timestamp_field, |
| 12 | + start_timestamp=start_timestamp, |
| 13 | + stop_timestamp=stop_timestamp, |
| 14 | + offset=offset, |
| 15 | + period=period) %} |
16 | 16 | {% do return(macro) %}
|
17 | 17 | {%- endmacro %}
|
18 | 18 |
|
19 |
| -{% macro snowflake__replace_placeholder_with_filter(core_sql, timestamp_field, start_timestamp, stop_timestamp, offset, period) %} |
| 19 | +{% macro default__replace_placeholder_with_filter(core_sql, timestamp_field, start_timestamp, stop_timestamp, offset, period) %} |
20 | 20 |
|
21 | 21 | {%- set period_filter -%}
|
22 | 22 | (TO_DATE({{ timestamp_field }}) >= DATE_TRUNC('{{ period }}', TO_DATE('{{ start_timestamp }}') + INTERVAL '{{ offset }} {{ period }}') AND
|
|
35 | 35 | {%- macro get_period_filter_sql(target_cols_csv, base_sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}
|
36 | 36 |
|
37 | 37 | {% set macro = adapter.dispatch('get_period_filter_sql',
|
38 |
| - packages = ['dbtvault'])(target_cols_csv=target_cols_csv, |
| 38 | + packages = var('adapter_packages', ['dbtvault']))(target_cols_csv=target_cols_csv, |
39 | 39 | base_sql=base_sql,
|
40 | 40 | timestamp_field=timestamp_field,
|
41 | 41 | period=period,
|
|
45 | 45 | {% do return(macro) %}
|
46 | 46 | {%- endmacro %}
|
47 | 47 |
|
48 |
| -{% macro snowflake__get_period_filter_sql(target_cols_csv, base_sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%} |
| 48 | +{% macro default__get_period_filter_sql(target_cols_csv, base_sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%} |
49 | 49 |
|
50 | 50 | {%- set filtered_sql = {'sql': base_sql} -%}
|
51 | 51 |
|
|
63 | 63 | {%- macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}
|
64 | 64 |
|
65 | 65 | {% set macro = adapter.dispatch('get_period_boundaries',
|
66 |
| - packages = ['dbtvault'])(target_schema=target_schema, |
| 66 | + packages = var('adapter_packages', ['dbtvault']))(target_schema=target_schema, |
67 | 67 | target_table=target_table,
|
68 | 68 | timestamp_field=timestamp_field,
|
69 | 69 | start_date=start_date,
|
|
73 | 73 | {% do return(macro) %}
|
74 | 74 | {%- endmacro %}
|
75 | 75 |
|
76 |
| -{% macro snowflake__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%} |
| 76 | +{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%} |
77 | 77 |
|
78 | 78 | {% set period_boundary_sql -%}
|
79 | 79 | with data as (
|
|
107 | 107 | {%- macro get_period_of_load(period, offset, start_timestamp) -%}
|
108 | 108 |
|
109 | 109 | {% set macro = adapter.dispatch('get_period_of_load',
|
110 |
| - packages = ['dbtvault'])(period=period, |
| 110 | + packages = var('adapter_packages', ['dbtvault']))(period=period, |
111 | 111 | offset=offset,
|
112 | 112 | start_timestamp=start_timestamp) %}
|
113 | 113 |
|
114 | 114 | {% do return(macro) %}
|
115 | 115 | {%- endmacro %}
|
116 | 116 |
|
117 |
| -{%- macro snowflake__get_period_of_load(period, offset, start_timestamp) -%} |
| 117 | +{%- macro default__get_period_of_load(period, offset, start_timestamp) -%} |
118 | 118 |
|
119 | 119 | {% set period_of_load_sql -%}
|
120 | 120 | SELECT DATE_TRUNC('{{ period }}', DATEADD({{ period }}, {{ offset }}, TO_DATE('{{start_timestamp}}'))) AS period_of_load
|
|
0 commit comments