Skip to content

Commit

Permalink
Merge branch 'main' into tox
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 authored Dec 5, 2024
2 parents 3ebdb6d + c6d9c26 commit a5032f4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`|
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/seeds/dag/dag_seeds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/seeds/structure/structure_seeds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions models/marts/core/int_all_graph_resources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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()) %}
Expand Down

0 comments on commit a5032f4

Please sign in to comment.