From d4e349a5adc0e1f1351ae2b46bdb134df1200b76 Mon Sep 17 00:00:00 2001 From: Theo Kiehn <162969167+tkiehn@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:03:26 +0200 Subject: [PATCH] Revert "Revert "Update stage.sql, add default ldts value"" --- macros/staging/stage.sql | 5 +++++ 1 file changed, 5 insertions(+) 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,