diff --git a/integration_tests/exclude_package/models/excluded_model.sql b/integration_tests/exclude_package/models/excluded_model.sql deleted file mode 100644 index 26d9cae7..00000000 --- a/integration_tests/exclude_package/models/excluded_model.sql +++ /dev/null @@ -1 +0,0 @@ -select 1 as id \ No newline at end of file diff --git a/integration_tests/exclude_package/models/_models.yml b/integration_tests/exclude_package/models/staging/_models.yml similarity index 100% rename from integration_tests/exclude_package/models/_models.yml rename to integration_tests/exclude_package/models/staging/_models.yml diff --git a/integration_tests/exclude_package/models/staging/_sources.yml b/integration_tests/exclude_package/models/staging/_sources.yml new file mode 100644 index 00000000..5a80acc6 --- /dev/null +++ b/integration_tests/exclude_package/models/staging/_sources.yml @@ -0,0 +1,4 @@ +sources: + - name: fake_source + tables: + - name: fake_source \ No newline at end of file diff --git a/integration_tests/exclude_package/models/staging/excluded_model.sql b/integration_tests/exclude_package/models/staging/excluded_model.sql new file mode 100644 index 00000000..9db788df --- /dev/null +++ b/integration_tests/exclude_package/models/staging/excluded_model.sql @@ -0,0 +1,2 @@ +-- {{ source('fake_source', 'fake_source') }} +select 1 as id \ 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 a4feb756..80524cef 100644 --- a/models/marts/structure/fct_model_directories.sql +++ b/models/marts/structure/fct_model_directories.sql @@ -14,6 +14,7 @@ folders as ( all_dag_relationships as ( select * from {{ ref('int_all_dag_relationships') }} + where not child_is_excluded ), staging_models as ( @@ -56,7 +57,6 @@ innappropriate_subdirectories_non_staging_models as ( on folders.model_type = all_graph_resources.model_type -- either appropriate folder_name is not in the current_directory_path or a inappropriate folder name is closer to the file_name where all_graph_resources.model_type <> all_graph_resources.model_type_folder - and not is_excluded ), unioned as (