From ad815f2d81dd7969053aeb4d22e216b3523561a1 Mon Sep 17 00:00:00 2001 From: Theo Kiehn <162969167+tkiehn@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:12:15 +0200 Subject: [PATCH 1/2] Update snowflake pit.sql to enable static pit_type-string Now it's possible for the pit_type-parameter to be a static string(prefixed by ! ) --- macros/tables/snowflake/pit.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/tables/snowflake/pit.sql b/macros/tables/snowflake/pit.sql index bf19c441..5476f54c 100644 --- a/macros/tables/snowflake/pit.sql +++ b/macros/tables/snowflake/pit.sql @@ -42,7 +42,7 @@ pit_records AS ( SELECT {% if datavault4dbt.is_something(pit_type) -%} - '{{ datavault4dbt.as_constant(pit_type) }}' as type, + {{ datavault4dbt.as_constant(pit_type) }} as type, {%- endif %} {% if datavault4dbt.is_something(custom_rsrc) -%} '{{ custom_rsrc }}' as {{ rsrc }}, From 55615a8f82333daa9ffa4cdbe68fc2c37b027941 Mon Sep 17 00:00:00 2001 From: Theo Kiehn <162969167+tkiehn@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:17:37 +0200 Subject: [PATCH 2/2] Update pit.sql parameter description Add remark that the pit_type has to be prefixed by ! --- macros/tables/pit.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/macros/tables/pit.sql b/macros/tables/pit.sql index d8944a73..c2a42b3f 100644 --- a/macros/tables/pit.sql +++ b/macros/tables/pit.sql @@ -12,8 +12,9 @@ Parameters: - pit_type::string String to insert into the 'pit_type' column. Allows for future implementations of other - PIT variants, like T-PITs etc. Can be set freely, something like 'PIT' could be the default. + pit_type::string String to insert into the 'pit_type' column. Has to be prefixed by a !. + Allows for future implementations of other PIT variants, like T-PITs etc. + Can be set freely, something like 'PIT' could be the default. Is optional, if not set, no column will be added. tracked_entity::string Name of the tracked Hub entity. Must be available as a model inside the dbt project.