Merge branch 'main' into tox

This commit is contained in:
dave-connors-3
2024-12-05 10:37:11 -06:00
committed by GitHub
4 changed files with 14 additions and 7 deletions

View File

@@ -19,8 +19,9 @@ hide:
|Modeling |[Root Models](../rules/modeling/#root-models) |`fct_root_models`|
|Modeling |[Staging Models Dependent on Downstream Models](../rules/modeling/#staging-models-dependent-on-downstream-models) |`fct_staging_dependent_on_marts_or_intermediate`|
|Modeling |[Unused Sources](../rules/modeling/#unused-sources) |`fct_unused_sources`|
|Modeling |[Models with Too Many Joins](../rules/modeling/#models-with-too-many-joins) |`fct_too_many_joins`|
|Modeling |[Models with Too Many Joins](../rules/modeling/#models-with-too-many-joins) |`fct_too_many_joins`|
|Testing |[Missing Primary Key Tests](../rules/testing/#missing-primary-key-tests) |`fct_missing_primary_key_tests`|
|Testing |[Missing Source Freshness](../rules/testing/#missing-source-freshness) |`fct_sources_without_freshness`|
|Testing |[Test Coverage](../rules/testing/#test-coverage) |`fct_test_coverage`|
|Documentation |[Undocumented Models](../rules/documentation/#undocumented-models) |`fct_undocumented_models`|
|Documentation |[Documentation Coverage](../rules/documentation/#documentation-coverage) |`fct_documentation_coverage`|

View File

@@ -8,7 +8,7 @@ seeds:
compare_model: ref('fct_multiple_sources_joined')
compare_columns:
- child
- source_parents
- "{{ 'source_parents' if target.type != 'databricks' else 'child' }}"
- name: test_fct_direct_join_to_source
tests:
@@ -49,7 +49,7 @@ seeds:
compare_model: ref('fct_source_fanout')
compare_columns:
- parent
- model_children
- "{{ 'model_children' if target.type != 'databricks' else 'parent' }}"
- name: test_fct_model_fanout
tests:
@@ -59,7 +59,7 @@ seeds:
compare_columns:
- parent
- parent_model_type
- leaf_children
- "{{ 'leaf_children' if target.type != 'databricks' else 'parent_model_type' }}"
- name: test_fct_staging_dependent_on_staging
tests:

View File

@@ -18,7 +18,7 @@ seeds:
compare_columns:
- resource_name
- model_type
- appropriate_prefixes
- "{{ 'appropriate_prefixes' if target.type != 'databricks' else 'model_type' }}"
- name: test_fct_source_directories
tests:
- dbt_utils.equality:

View File

@@ -2,12 +2,18 @@
{# flatten the sets of permissable primary key test sets to one level for later iteration #}
{%- set test_macro_list = [] %}
{%- set test_macro_names_list = [] %}
{%- for test_set in var('primary_key_test_macros') -%}
{%- for test in test_set %}
{%- do test_macro_list.append(test) -%}
{%- do test_macro_list.append(test) -%}
{%- endfor %}
{%- endfor -%}
{%- do test_macro_list.append("dbt.test_unique") -%}
{% for test in test_macro_list %}
{%- do test_macro_names_list.append(test.split('.')[1]) -%}
{%- endfor -%}
{%- if "test_unique" not in test_macro_names_list -%}
{%- 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()) %}