Commit 46dbfed Claire Carroll
authored
File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 143
143
);
144
144
{%- endcall %}
145
145
{% set result = load_result(' main-' ~ i) %}
146
- {% set rows_inserted = result[' response' ][' rows_affected' ] %}
146
+ {% if ' response' in result .keys () %} {# added in v0.19.0 #}
147
+ {% set rows_inserted = result[' response' ][' rows_affected' ] %}
148
+ {% else %} {# older versions #}
149
+ {% set rows_inserted = result[' status' ].split(" " )[2 ] | int %}
147
150
{% endif %}
151
+
148
152
{%- set sum_rows_inserted = loop_vars[' sum_rows_inserted' ] + rows_inserted - %}
149
153
{%- if loop_vars .update ({' sum_rows_inserted' : sum_rows_inserted}) %} {% endif - %}
150
154
167
171
168
172
{%- set status_string = " INSERT " ~ loop_vars[' sum_rows_inserted' ] - %}
169
173
170
- {% call noop_statement(name = ' main' , message = status_string) - %}
174
+ {% call noop_statement(' main' , status_string) - %}
171
175
-- no-op
172
176
{%- endcall %}
173
177
Original file line number Diff line number Diff line change @@ -24,5 +24,8 @@ if [[ ! -z $3 ]]; then _seeds="--select $3 --full-refresh"; fi
24
24
25
25
dbt deps --target $1
26
26
dbt seed --target $1 $_seeds
27
+ if [ $1 == ' redshift' ]; then
28
+ dbt run -x -m test_insert_by_period --full-refresh --target redshift
29
+ fi
27
30
dbt run -x --target $1 $_models
28
31
dbt test -x --target $1 $_models
You can’t perform that action at this time.
0 commit comments