Skip to content

Commit b514e43

Browse files
authored
Update stage.sql, add default ldts value
If no ldts is specified in the stage-macro-call the current timestamp will be used as value
1 parent 42f5e5c commit b514e43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

macros/staging/stage.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@
109109
{%- set include_source_columns = true -%}
110110
{%- endif -%}
111111

112+
{# If ldts is empty replace it with the current timestamp #}
113+
{%- if datavault4dbt.is_nothing(ldts) -%}
114+
{%- set ldts = datavault4dbt.current_timestamp() -%}
115+
{%- endif -%}
116+
112117
{{- adapter.dispatch('stage', 'datavault4dbt')(include_source_columns=include_source_columns,
113118
ldts=ldts,
114119
rsrc=rsrc,

0 commit comments

Comments
 (0)