diff --git a/macros/staging/stage.sql b/macros/staging/stage.sql index 25aebe8d..5d7185df 100644 --- a/macros/staging/stage.sql +++ b/macros/staging/stage.sql @@ -109,6 +109,11 @@ {%- set include_source_columns = true -%} {%- endif -%} + {# If ldts is empty replace it with the current timestamp #} + {%- if datavault4dbt.is_nothing(ldts) -%} + {%- set ldts = datavault4dbt.current_timestamp() -%} + {%- endif -%} + {{- adapter.dispatch('stage', 'datavault4dbt')(include_source_columns=include_source_columns, ldts=ldts, rsrc=rsrc,