From fcebd6813537390a6ab8c2c0f684755a706d1f86 Mon Sep 17 00:00:00 2001 From: Pfitzn Date: Thu, 19 Sep 2024 13:45:08 +0200 Subject: [PATCH] Removed line that adds the built-in unique test to the "primary_key_test_macros" list in order to avoid name collisions on unique test definition overrides --- models/marts/core/int_all_graph_resources.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/marts/core/int_all_graph_resources.sql b/models/marts/core/int_all_graph_resources.sql index 01681444..d8a54f3f 100644 --- a/models/marts/core/int_all_graph_resources.sql +++ b/models/marts/core/int_all_graph_resources.sql @@ -7,7 +7,9 @@ {%- do test_macro_list.append(test) -%} {%- endfor %} {%- endfor -%} -{%- do test_macro_list.append("dbt.test_unique") -%} +{%- if test_macro_list | length == 0 -%} + {%- do test_macro_list.append("dbt.test_unique") -%} +{%- endif -%} {%- set test_macro_set = set_strict(test_macro_list) -%} {%- set quoted_directory_pattern = wrap_string_with_quotes(get_directory_pattern()) %}