diff --git a/macros/filter_exceptions.sql b/macros/filter_exceptions.sql index 9c86109a..ea2834a4 100644 --- a/macros/filter_exceptions.sql +++ b/macros/filter_exceptions.sql @@ -1,15 +1,15 @@ -{% macro filter_exceptions(model_name) -%} - {{ return(adapter.dispatch('filter_exceptions', 'dbt_project_evaluator')(model_name)) }} +{% macro filter_exceptions() -%} + {{ return(adapter.dispatch('filter_exceptions', 'dbt_project_evaluator')()) }} {%- endmacro %} -{% macro default__filter_exceptions(model_name) %} +{% macro default__filter_exceptions() %} {% set query_filters %} select column_name, id_to_exclude from {{ ref('dbt_project_evaluator_exceptions') }} - where fct_name = '{{ model_name }}' + where fct_name = '{{ model.name }}' {% endset %} {% if execute %} diff --git a/models/marts/dag/fct_direct_join_to_source.sql b/models/marts/dag/fct_direct_join_to_source.sql index da51cbeb..41c71c04 100644 --- a/models/marts/dag/fct_direct_join_to_source.sql +++ b/models/marts/dag/fct_direct_join_to_source.sql @@ -41,4 +41,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_hard_coded_references.sql b/models/marts/dag/fct_hard_coded_references.sql index e3e6ccc9..9e6a818a 100644 --- a/models/marts/dag/fct_hard_coded_references.sql +++ b/models/marts/dag/fct_hard_coded_references.sql @@ -16,4 +16,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_marts_or_intermediate_dependent_on_source.sql b/models/marts/dag/fct_marts_or_intermediate_dependent_on_source.sql index e6a1cd2f..e8ef303e 100644 --- a/models/marts/dag/fct_marts_or_intermediate_dependent_on_source.sql +++ b/models/marts/dag/fct_marts_or_intermediate_dependent_on_source.sql @@ -19,4 +19,4 @@ final as ( ) select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_model_fanout.sql b/models/marts/dag/fct_model_fanout.sql index 72285d17..5e7f317a 100644 --- a/models/marts/dag/fct_model_fanout.sql +++ b/models/marts/dag/fct_model_fanout.sql @@ -48,4 +48,4 @@ model_fanout_agg as ( select * from model_fanout_agg -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_multiple_sources_joined.sql b/models/marts/dag/fct_multiple_sources_joined.sql index 7bf8b812..175d07c7 100644 --- a/models/marts/dag/fct_multiple_sources_joined.sql +++ b/models/marts/dag/fct_multiple_sources_joined.sql @@ -27,4 +27,4 @@ multiple_sources_joined as ( select * from multiple_sources_joined -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_rejoining_of_upstream_concepts.sql b/models/marts/dag/fct_rejoining_of_upstream_concepts.sql index 12cd0ad7..2bc2d68e 100644 --- a/models/marts/dag/fct_rejoining_of_upstream_concepts.sql +++ b/models/marts/dag/fct_rejoining_of_upstream_concepts.sql @@ -66,4 +66,4 @@ final_filtered as ( select * from final_filtered -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_root_models.sql b/models/marts/dag/fct_root_models.sql index d86d2005..45d3e997 100644 --- a/models/marts/dag/fct_root_models.sql +++ b/models/marts/dag/fct_root_models.sql @@ -22,4 +22,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_source_fanout.sql b/models/marts/dag/fct_source_fanout.sql index 3ec34c9f..e3f6fa35 100644 --- a/models/marts/dag/fct_source_fanout.sql +++ b/models/marts/dag/fct_source_fanout.sql @@ -27,4 +27,4 @@ source_fanout as ( select * from source_fanout -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_staging_dependent_on_marts_or_intermediate.sql b/models/marts/dag/fct_staging_dependent_on_marts_or_intermediate.sql index aa411f12..0aa7fb3d 100644 --- a/models/marts/dag/fct_staging_dependent_on_marts_or_intermediate.sql +++ b/models/marts/dag/fct_staging_dependent_on_marts_or_intermediate.sql @@ -22,4 +22,4 @@ final as ( ) select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_staging_dependent_on_staging.sql b/models/marts/dag/fct_staging_dependent_on_staging.sql index a69574ad..57982d4e 100644 --- a/models/marts/dag/fct_staging_dependent_on_staging.sql +++ b/models/marts/dag/fct_staging_dependent_on_staging.sql @@ -23,4 +23,4 @@ bending_connections as ( select * from bending_connections -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/dag/fct_unused_sources.sql b/models/marts/dag/fct_unused_sources.sql index 7dfe583f..84259c9e 100644 --- a/models/marts/dag/fct_unused_sources.sql +++ b/models/marts/dag/fct_unused_sources.sql @@ -19,4 +19,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/documentation/fct_undocumented_models.sql b/models/marts/documentation/fct_undocumented_models.sql index edf10a97..19799ca9 100644 --- a/models/marts/documentation/fct_undocumented_models.sql +++ b/models/marts/documentation/fct_undocumented_models.sql @@ -19,4 +19,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/documentation/fct_undocumented_source_tables.sql b/models/marts/documentation/fct_undocumented_source_tables.sql index 57558298..1bdb570b 100644 --- a/models/marts/documentation/fct_undocumented_source_tables.sql +++ b/models/marts/documentation/fct_undocumented_source_tables.sql @@ -18,4 +18,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/documentation/fct_undocumented_sources.sql b/models/marts/documentation/fct_undocumented_sources.sql index bb82b5d1..64207a09 100644 --- a/models/marts/documentation/fct_undocumented_sources.sql +++ b/models/marts/documentation/fct_undocumented_sources.sql @@ -18,4 +18,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/governance/fct_exposures_dependent_on_private_models.sql b/models/marts/governance/fct_exposures_dependent_on_private_models.sql index 3c750ea8..356777e6 100644 --- a/models/marts/governance/fct_exposures_dependent_on_private_models.sql +++ b/models/marts/governance/fct_exposures_dependent_on_private_models.sql @@ -26,4 +26,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/governance/fct_public_models_without_contract.sql b/models/marts/governance/fct_public_models_without_contract.sql index fa07d3ca..09bac2b0 100644 --- a/models/marts/governance/fct_public_models_without_contract.sql +++ b/models/marts/governance/fct_public_models_without_contract.sql @@ -20,4 +20,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/governance/fct_undocumented_public_models.sql b/models/marts/governance/fct_undocumented_public_models.sql index 6ec6d9b2..c6527001 100644 --- a/models/marts/governance/fct_undocumented_public_models.sql +++ b/models/marts/governance/fct_undocumented_public_models.sql @@ -28,4 +28,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/performance/fct_chained_views_dependencies.sql b/models/marts/performance/fct_chained_views_dependencies.sql index 95b7ae7a..78648cce 100644 --- a/models/marts/performance/fct_chained_views_dependencies.sql +++ b/models/marts/performance/fct_chained_views_dependencies.sql @@ -20,6 +20,6 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} +{{ filter_exceptions() }} order by distance desc \ No newline at end of file diff --git a/models/marts/performance/fct_exposure_parents_materializations.sql b/models/marts/performance/fct_exposure_parents_materializations.sql index 0f519a2e..bbb801d4 100644 --- a/models/marts/performance/fct_exposure_parents_materializations.sql +++ b/models/marts/performance/fct_exposure_parents_materializations.sql @@ -31,4 +31,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/structure/fct_model_directories.sql b/models/marts/structure/fct_model_directories.sql index 80524cef..082fde7c 100644 --- a/models/marts/structure/fct_model_directories.sql +++ b/models/marts/structure/fct_model_directories.sql @@ -67,6 +67,6 @@ unioned as ( select * from unioned -{{ filter_exceptions(model.name) }} +{{ filter_exceptions() }} diff --git a/models/marts/structure/fct_model_naming_conventions.sql b/models/marts/structure/fct_model_naming_conventions.sql index a3d7403d..02d08858 100644 --- a/models/marts/structure/fct_model_naming_conventions.sql +++ b/models/marts/structure/fct_model_naming_conventions.sql @@ -54,4 +54,4 @@ inappropriate_model_names as ( select * from inappropriate_model_names -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/structure/fct_source_directories.sql b/models/marts/structure/fct_source_directories.sql index bc1b73e0..41372eb3 100644 --- a/models/marts/structure/fct_source_directories.sql +++ b/models/marts/structure/fct_source_directories.sql @@ -23,4 +23,4 @@ inappropriate_subdirectories_sources as ( select * from inappropriate_subdirectories_sources -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/structure/fct_test_directories.sql b/models/marts/structure/fct_test_directories.sql index 0e6a3609..d0c56969 100644 --- a/models/marts/structure/fct_test_directories.sql +++ b/models/marts/structure/fct_test_directories.sql @@ -85,4 +85,4 @@ different_directories as ( select * from different_directories -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file diff --git a/models/marts/tests/fct_missing_primary_key_tests.sql b/models/marts/tests/fct_missing_primary_key_tests.sql index 8d1227e3..c13eaff3 100644 --- a/models/marts/tests/fct_missing_primary_key_tests.sql +++ b/models/marts/tests/fct_missing_primary_key_tests.sql @@ -20,4 +20,4 @@ final as ( select * from final -{{ filter_exceptions(model.name) }} \ No newline at end of file +{{ filter_exceptions() }} \ No newline at end of file