Skip to content

Commit

Permalink
Replace logging in insert-by-period materialization
Browse files Browse the repository at this point in the history
  • Loading branch information
clrcrl committed Jul 11, 2019
1 parent db62665 commit 1cbcc67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/materializations/insert_by_period_materialization.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
-- commit each period as a separate transaction
{% for i in range(num_periods) -%}
{%- set msg = "Running for " ~ period ~ " " ~ (i + 1) ~ " of " ~ (num_periods) -%}
{{log(" + " ~ modules.datetime.datetime.now().strftime('%H:%M:%S') ~ " " ~ msg, info=True)}}
{{ dbt_utils.log_info(msg) }}

{%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}
{%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,
Expand Down Expand Up @@ -147,7 +147,7 @@
{%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}

{%- set msg = "Ran for " ~ period ~ " " ~ (i + 1) ~ " of " ~ (num_periods) ~ "; " ~ rows_inserted ~ " records inserted" -%}
{{log(" + " ~ modules.datetime.datetime.now().strftime('%H:%M:%S') ~ " " ~ msg, info=True)}}
{{ dbt_utils.log_info(msg) }}

{%- endfor %}

Expand Down

0 comments on commit 1cbcc67

Please sign in to comment.