Skip to content

Commit

Permalink
Merge pull request #632 from basedosdados/custom_dict
Browse files Browse the repository at this point in the history
[Refactor] custom_dictionary_coverage
  • Loading branch information
folhesgabriel authored Nov 26, 2024
2 parents d1848ec + 0ce6e1d commit eecb672
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/generic/custom_dictionary_coverage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit eecb672

Please sign in to comment.