Skip to content

Commit d559a3e

Browse files
committed
Replace logging in insert-by-period materialization
1 parent de81ac7 commit d559a3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/materializations/insert_by_period_materialization.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
-- commit each period as a separate transaction
116116
{% for i in range(num_periods) -%}
117117
{%- set msg = "Running for " ~ period ~ " " ~ (i + 1) ~ " of " ~ (num_periods) -%}
118-
{{log(" + " ~ modules.datetime.datetime.now().strftime('%H:%M:%S') ~ " " ~ msg, info=True)}}
118+
{{ dbt_utils.log_info(msg) }}
119119

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

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

152152
{%- endfor %}
153153

0 commit comments

Comments
 (0)