exclude custom test directory from check

This commit is contained in:
Dave Connors
2022-12-06 08:47:31 -06:00
parent 471e7167cf
commit 643bca59e8
5 changed files with 8 additions and 3 deletions

View File

@@ -7,6 +7,6 @@ int_model_5,FALSE,0
report_1,FALSE,0
report_2,FALSE,0
report_3,FALSE,0
stg_model_1,FALSE,1
stg_model_1,FALSE,2
stg_model_3,FALSE,0
stg_model_5,FALSE,0
1 resource_name is_primary_key_tested number_of_tests_on_model
7 report_1 FALSE 0
8 report_2 FALSE 0
9 report_3 FALSE 0
10 stg_model_1 FALSE 1 2
11 stg_model_3 FALSE 0
12 stg_model_5 FALSE 0

View File

@@ -1,2 +1,2 @@
total_models,total_tests,tested_models,test_coverage_pct,staging_test_coverage_pct,intermediate_test_coverage_pct,marts_test_coverage_pct,other_test_coverage_pct,test_to_model_ratio
14,9,4,28.57,60.00,50.00,0.00,0.00,0.6429
14,10,4,28.57,60.00,50.00,0.00,0.00,0.7143
1 total_models total_tests tested_models test_coverage_pct staging_test_coverage_pct intermediate_test_coverage_pct marts_test_coverage_pct other_test_coverage_pct test_to_model_ratio
2 14 9 10 4 28.57 60.00 50.00 0.00 0.00 0.6429 0.7143

View File

@@ -0,0 +1,2 @@
select * from {{ ref('stg_model_1') }}
where false

View File

@@ -44,6 +44,7 @@ joined as (
unioned_with_calc.resource_type,
unioned_with_calc.file_path,
unioned_with_calc.directory_path,
unioned_with_calc.directory_path like 'models/%' as is_in_models_directory,
unioned_with_calc.file_name,
case
when unioned_with_calc.resource_type in ('test', 'source', 'metric', 'exposure', 'seed') then null

View File

@@ -48,7 +48,9 @@ test_file_paths as (
file_name as test_yml_name,
directory_path as test_yml_directory_path
from resources
where resource_type = 'test'
where
resource_type = 'test'
and is_in_models_directory
),