From 0ce6e1de47276443e907c515de9881929c659d0d Mon Sep 17 00:00:00 2001 From: uiro-bi Date: Tue, 26 Nov 2024 09:20:24 -0300 Subject: [PATCH] feat: add refactored test --- tests/generic/custom_dictionary_coverage.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/generic/custom_dictionary_coverage.sql b/tests/generic/custom_dictionary_coverage.sql index 9bace9a8..614ebb82 100644 --- a/tests/generic/custom_dictionary_coverage.sql +++ b/tests/generic/custom_dictionary_coverage.sql @@ -6,7 +6,13 @@ {%- set combined_query_parts = [] -%} {%- set union_parts = [] -%} - {% set table_id = model.identifier %} + + {% set model_sql = model | string %} + {% set start = model_sql.find("`") + 1 %} + {% set end = model_sql.rfind("`") %} + {% set full_path = model_sql[start:end] %} + {% set path_parts = full_path.split(".") %} + {% set table_id = path_parts[2].replace("`", "").strip() %} {%- for column_name in columns_covered_by_dictionary %} {% set subquery_name = "exceptions_" ~ loop.index %}