From ce3da2917181c674d489e513d7269105b216ad4e Mon Sep 17 00:00:00 2001 From: Tim Kirschke <81677440+tkirschke@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:49:29 +0100 Subject: [PATCH] Use md5 of model name and invocation id for testview name --- dbt/include/fabric/macros/materializations/tests/helpers.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/fabric/macros/materializations/tests/helpers.sql b/dbt/include/fabric/macros/materializations/tests/helpers.sql index 4f04547..1dda612 100644 --- a/dbt/include/fabric/macros/materializations/tests/helpers.sql +++ b/dbt/include/fabric/macros/materializations/tests/helpers.sql @@ -9,7 +9,7 @@ {% if main_sql.strip().lower().startswith('with') %} {% set testview %} - [{{ target.schema }}.testview_{{ range(1300, 19000) | random }}] + [{{ target.schema }}.testview_{{ local_md5(model.name ~ invocation_id) }}] {% endset %} {% set sql = main_sql.replace("'", "''")%}