Skip to content

Commit

Permalink
broken commit: update internals of insert by period
Browse files Browse the repository at this point in the history
  • Loading branch information
clrcrl committed Jan 6, 2021
1 parent d91c386 commit 3e0e691
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions macros/materializations/insert_by_period_materialization.sql
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@
from {{tmp_relation.include(schema=False)}}
);
{%- endcall %}
{%- set rows_inserted = (load_result('main-' ~ i)['status'].split(" "))[2] | int -%}
{% set result = load_result('main-' ~ i) %}
{% set rows_inserted = result['response']['rows_affected'] %}
{% endif %}
{%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}
{%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}

Expand All @@ -165,7 +167,7 @@

{%- set status_string = "INSERT " ~ loop_vars['sum_rows_inserted'] -%}

{% call noop_statement(name='main', status=status_string) -%}
{% call noop_statement(name='main', message=status_string) -%}
-- no-op
{%- endcall %}

Expand Down

0 comments on commit 3e0e691

Please sign in to comment.