From 142038325555fcaa453583d5cc242f1632db220e Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:22:48 -0600 Subject: [PATCH 01/25] add versino to unpack macros, recursive sql, and intermediate core models --- macros/recursive_dag.sql | 24 +++++++++++++++---- macros/unpack/get_node_values.sql | 2 ++ models/marts/core/int_all_graph_resources.sql | 2 ++ .../marts/core/int_direct_relationships.sql | 4 +++- .../intermediate/int_model_test_summary.sql | 4 +++- models/staging/graph/stg_nodes.sql | 2 ++ 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/macros/recursive_dag.sql b/macros/recursive_dag.sql index 38d1614d..5604dd0d 100644 --- a/macros/recursive_dag.sql +++ b/macros/recursive_dag.sql @@ -28,6 +28,8 @@ all_relationships ( parent_directory_path, parent_file_name, parent_is_excluded, + parent_version, + parent_deprecation_date, child_id, child, child_resource_type, @@ -40,6 +42,8 @@ all_relationships ( child_directory_path, child_file_name, child_is_excluded, + child_version, + child_deprecation_date, distance, path, is_dependent_on_chain_of_views @@ -58,6 +62,8 @@ all_relationships ( directory_path as parent_directory_path, file_name as parent_file_name, is_excluded as parent_is_excluded, + version as parent_version, + deprecation_date as parent_deprecation_date, resource_id as child_id, resource_name as child, resource_type as child_resource_type, @@ -70,8 +76,10 @@ all_relationships ( directory_path as child_directory_path, file_name as child_file_name, is_excluded as child_is_excluded, + version as child_version, + deprecation_date as child_deprecation_date, 0 as distance, - {{ dbt.array_construct(['resource_name']) }} as path, + {{ dbt.array_construct(['resource_id']) }} as path, cast(null as boolean) as is_dependent_on_chain_of_views from direct_relationships @@ -93,6 +101,8 @@ all_relationships ( all_relationships.parent_directory_path as parent_directory_path, all_relationships.parent_file_name as parent_file_name, all_relationships.parent_is_excluded as parent_is_excluded, + all_relationships.parent_version as parent_version, + all_relationships.parent_deprecation_date as parent_deprecation_date, direct_relationships.resource_id as child_id, direct_relationships.resource_name as child, direct_relationships.resource_type as child_resource_type, @@ -105,8 +115,10 @@ all_relationships ( direct_relationships.directory_path as child_directory_path, direct_relationships.file_name as child_file_name, direct_relationships.is_excluded as child_is_excluded, + direct_relationships.version as child_version, + direct_relationships.deprecation_date as child_deprecation_date, all_relationships.distance+1 as distance, - {{ dbt.array_append('all_relationships.path', 'direct_relationships.resource_name') }} as path, + {{ dbt.array_append('all_relationships.path', 'direct_relationships.resource_id') }} as path, case when all_relationships.child_materialized in ('view', 'ephemeral') @@ -174,7 +186,7 @@ with direct_relationships as ( child_access, child_is_excluded, 0 as distance, - {{ dbt.array_construct(['resource_name']) }} as path, + {{ dbt.array_construct(['resource_id']) }} as path, cast(null as boolean) as is_dependent_on_chain_of_views from get_distinct ) @@ -190,7 +202,7 @@ with direct_relationships as ( direct_relationships.access as child_access, direct_relationships.is_excluded as child_is_excluded, cte_{{i - 1}}.distance+1 as distance, - {{ dbt.array_append(prev_cte_path, 'direct_relationships.resource_name') }} as path, + {{ dbt.array_append(prev_cte_path, 'direct_relationships.resource_id') }} as path, case when cte_{{i - 1}}.child_materialized in ('view', 'ephemeral') @@ -231,6 +243,8 @@ with direct_relationships as ( parent.directory_path as parent_directory_path, parent.file_name as parent_file_name, parent.is_excluded as parent_is_excluded, + parent.version as parent_version, + parent.deprecation_date as parent_deprecation_date, child.resource_id as child_id, child.resource_name as child, child.resource_type as child_resource_type, @@ -243,6 +257,8 @@ with direct_relationships as ( child.directory_path as child_directory_path, child.file_name as child_file_name, child.is_excluded as child_is_excluded, + child.version as child_version, + child.deprecation_date as child_deprecation_date, all_relationships_unioned.distance, all_relationships_unioned.path, all_relationships_unioned.is_dependent_on_chain_of_views diff --git a/macros/unpack/get_node_values.sql b/macros/unpack/get_node_values.sql index a863684e..558eb2ec 100644 --- a/macros/unpack/get_node_values.sql +++ b/macros/unpack/get_node_values.sql @@ -27,6 +27,8 @@ wrap_string_with_quotes(node.group), wrap_string_with_quotes(node.access), wrap_string_with_quotes(node.latest_version), + wrap_string_with_quotes(node.version), + wrap_string_with_quotes(node.deprecation_date), "cast(" ~ contract | trim ~ " as boolean)", node.columns.values() | list | length, node.columns.values() | list | selectattr('description') | list | length, diff --git a/models/marts/core/int_all_graph_resources.sql b/models/marts/core/int_all_graph_resources.sql index 58b71953..095c2bce 100644 --- a/models/marts/core/int_all_graph_resources.sql +++ b/models/marts/core/int_all_graph_resources.sql @@ -83,6 +83,8 @@ joined as ( unioned_with_calc.access, unioned_with_calc.access = 'public' as is_public, unioned_with_calc.latest_version, + unioned_with_calc.version, + unioned_with_calc.deprecation_date, unioned_with_calc.is_contract_enforced, unioned_with_calc.total_defined_columns, unioned_with_calc.total_described_columns, diff --git a/models/marts/core/int_direct_relationships.sql b/models/marts/core/int_direct_relationships.sql index f138ae5b..524de221 100644 --- a/models/marts/core/int_direct_relationships.sql +++ b/models/marts/core/int_direct_relationships.sql @@ -14,7 +14,9 @@ all_graph_resources as ( is_public, access, source_name, - is_excluded + is_excluded, + version, + deprecation_date from {{ ref('int_all_graph_resources') }} ), diff --git a/models/marts/tests/intermediate/int_model_test_summary.sql b/models/marts/tests/intermediate/int_model_test_summary.sql index 2f07daaa..c2704078 100644 --- a/models/marts/tests/intermediate/int_model_test_summary.sql +++ b/models/marts/tests/intermediate/int_model_test_summary.sql @@ -55,7 +55,9 @@ agg_test_relationships as ( final as ( select - all_graph_resources.resource_name, + all_graph_resources.resource_id, + all_graph_resources.resource_name, + all_graph_resources.version, all_graph_resources.resource_type, all_graph_resources.model_type, coalesce(agg_test_relationships.is_primary_key_tested, FALSE) as is_primary_key_tested, diff --git a/models/staging/graph/stg_nodes.sql b/models/staging/graph/stg_nodes.sql index a5d5ecfe..2cdd3489 100644 --- a/models/staging/graph/stg_nodes.sql +++ b/models/staging/graph/stg_nodes.sql @@ -26,6 +26,8 @@ select cast(null as {{ dbt.type_string() }}) as model_group, cast(null as {{ dbt.type_string() }}) as access, cast(null as {{ dbt.type_string() }}) as latest_version, + cast(null as {{ dbt.type_string() }}) as version, + cast(null as {{ dbt.type_string() }}) as deprecation_date, cast(True as boolean) as is_contract_enforced, cast(0 as {{ dbt.type_int() }}) as total_defined_columns, cast(0 as {{ dbt.type_int() }}) as total_described_columns, From ef1fe4e72132a573914efdf5bcfda66c6620774f Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:23:05 -0600 Subject: [PATCH 02/25] update uniqueness test --- .../models/dbt_project_evaluator_schema_tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml b/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml index e5c3745a..d48614db 100644 --- a/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml +++ b/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml @@ -4,7 +4,7 @@ models: - name: int_model_test_summary description: this model creates some initial metrics required for the downstream models related to testing columns: - - name: resource_name + - name: resource_id tests: - unique - not_null \ No newline at end of file From 8eb588973deeaf0d2307e98f3907237927141171 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:23:25 -0600 Subject: [PATCH 03/25] add versions to int_model_5 --- integration_tests/models/marts/_int_model_5.yml | 9 +++++++++ integration_tests/models/marts/int_model_5_v1.sql | 1 + .../models/marts/{int_model_5.sql => int_model_5_v2.sql} | 0 integration_tests/models/marts/int_model_5_v3.sql | 1 + 4 files changed, 11 insertions(+) create mode 100644 integration_tests/models/marts/_int_model_5.yml create mode 100644 integration_tests/models/marts/int_model_5_v1.sql rename integration_tests/models/marts/{int_model_5.sql => int_model_5_v2.sql} (100%) create mode 100644 integration_tests/models/marts/int_model_5_v3.sql diff --git a/integration_tests/models/marts/_int_model_5.yml b/integration_tests/models/marts/_int_model_5.yml new file mode 100644 index 00000000..4b20b28b --- /dev/null +++ b/integration_tests/models/marts/_int_model_5.yml @@ -0,0 +1,9 @@ +models: + - name: int_model_5 + latest_version: 2 + versions: + - v: 1 + deprecation_date: 2024-01-01 + - v: 2 + deprecation_date: 2029-01-01 + - v: 3 \ No newline at end of file diff --git a/integration_tests/models/marts/int_model_5_v1.sql b/integration_tests/models/marts/int_model_5_v1.sql new file mode 100644 index 00000000..26d9cae7 --- /dev/null +++ b/integration_tests/models/marts/int_model_5_v1.sql @@ -0,0 +1 @@ +select 1 as id \ No newline at end of file diff --git a/integration_tests/models/marts/int_model_5.sql b/integration_tests/models/marts/int_model_5_v2.sql similarity index 100% rename from integration_tests/models/marts/int_model_5.sql rename to integration_tests/models/marts/int_model_5_v2.sql diff --git a/integration_tests/models/marts/int_model_5_v3.sql b/integration_tests/models/marts/int_model_5_v3.sql new file mode 100644 index 00000000..26d9cae7 --- /dev/null +++ b/integration_tests/models/marts/int_model_5_v3.sql @@ -0,0 +1 @@ +select 1 as id \ No newline at end of file From 935dd94445beddebeae6c11bf4cb27fc649e42e6 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:23:46 -0600 Subject: [PATCH 04/25] update direct join to source test --- .../seeds/dag/test_fct_direct_join_to_source.csv | 4 ++-- models/marts/dag/fct_direct_join_to_source.sql | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv b/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv index 7f8a6c55..01276d1b 100644 --- a/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv +++ b/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv @@ -1,2 +1,2 @@ -parent,parent_resource_type,child,child_resource_type,distance -source_1.table_2,source,int_model_4,model,1 \ No newline at end of file +parent,parent_resource_type,child,child_version,child_resource_type,distance +source_1.table_2,source,int_model_4,,model,1 \ No newline at end of file diff --git a/models/marts/dag/fct_direct_join_to_source.sql b/models/marts/dag/fct_direct_join_to_source.sql index 41c71c04..7065474e 100644 --- a/models/marts/dag/fct_direct_join_to_source.sql +++ b/models/marts/dag/fct_direct_join_to_source.sql @@ -30,6 +30,7 @@ final as ( direct_model_relationships.parent, direct_model_relationships.parent_resource_type, direct_model_relationships.child, + direct_model_relationships.child_version, direct_model_relationships.child_resource_type, direct_model_relationships.distance from direct_model_relationships From aff915778e4608e34e44eba8f89daa013b596a9d Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:24:00 -0600 Subject: [PATCH 05/25] update hard coded rule --- .../seeds/dag/test_fct_hard_coded_references.csv | 4 ++-- models/marts/dag/fct_hard_coded_references.sql | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_hard_coded_references.csv b/integration_tests/seeds/dag/test_fct_hard_coded_references.csv index 9393447a..3dcbbef2 100644 --- a/integration_tests/seeds/dag/test_fct_hard_coded_references.csv +++ b/integration_tests/seeds/dag/test_fct_hard_coded_references.csv @@ -1,2 +1,2 @@ -model,hard_coded_references -fct_model_6,"""my_db"".""my_schema"".""my_table"", ""my_schema"".""raw_relation_5"", ""raw_relation_2"", 'my_db'.'my_schema'.'my_table', 'my_schema'.'raw_relation_5', 'raw_relation_4', [my_db].[my_schema].[my_table], [my_schema].[raw_relation_5], [raw_relation_3], `my_db`.`my_schema`.`my_table`, `my_schema`.`raw_relation_5`, `raw_relation_1`, my_db.my_schema.my_table, my_schema.raw_relation_5, {{ var(""my_table_reference"") }}, {{ var(""my_table_reference"", ""table_d"") }}, {{ var('my_table_reference') }}, {{ var('my_table_reference', 'table_d') }}" \ No newline at end of file +model,model_version,hard_coded_references +fct_model_6,,"""my_db"".""my_schema"".""my_table"", ""my_schema"".""raw_relation_5"", ""raw_relation_2"", 'my_db'.'my_schema'.'my_table', 'my_schema'.'raw_relation_5', 'raw_relation_4', [my_db].[my_schema].[my_table], [my_schema].[raw_relation_5], [raw_relation_3], `my_db`.`my_schema`.`my_table`, `my_schema`.`raw_relation_5`, `raw_relation_1`, my_db.my_schema.my_table, my_schema.raw_relation_5, {{ var(""my_table_reference"") }}, {{ var(""my_table_reference"", ""table_d"") }}, {{ var('my_table_reference') }}, {{ var('my_table_reference', 'table_d') }}" \ 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 9e6a818a..7214a5d0 100644 --- a/models/marts/dag/fct_hard_coded_references.sql +++ b/models/marts/dag/fct_hard_coded_references.sql @@ -9,6 +9,7 @@ with models as ( final as ( select resource_name as model, + version as model_version, hard_coded_references from models where hard_coded_references is not null From dfdfd23dc528fbe5b4fe2901f558f4b74739e86d Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:24:12 -0600 Subject: [PATCH 06/25] update fanout rule --- integration_tests/seeds/dag/test_fct_model_fanout.csv | 4 ++-- models/marts/dag/fct_model_fanout.sql | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_model_fanout.csv b/integration_tests/seeds/dag/test_fct_model_fanout.csv index 02e84f61..d23782e6 100644 --- a/integration_tests/seeds/dag/test_fct_model_fanout.csv +++ b/integration_tests/seeds/dag/test_fct_model_fanout.csv @@ -1,2 +1,2 @@ -parent,parent_model_type,leaf_children -fct_model_6,marts,"report_1, report_2, report_3" \ No newline at end of file +parent,parent_version,parent_model_type,leaf_children +fct_model_6,,marts,"report_1, report_2, report_3" \ 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 5e7f317a..a09178ea 100644 --- a/models/marts/dag/fct_model_fanout.sql +++ b/models/marts/dag/fct_model_fanout.sql @@ -22,19 +22,21 @@ model_fanout as ( select all_dag_relationships.parent, all_dag_relationships.parent_model_type, - all_dag_relationships.child + all_dag_relationships.parent_version, + {{ dbt.concat() }} all_dag_relationships.child from all_dag_relationships inner join models_without_children on all_dag_relationships.child = models_without_children.parent where all_dag_relationships.distance = 1 and all_dag_relationships.child_resource_type = 'model' - group by 1, 2, 3 + group by 1, 2, 3, 4 -- we order the CTE so that listagg returns values correctly sorted for some warehouses - order by 1, 2, 3 + order by 1, 2, 3, 4 ), model_fanout_agg as ( select parent, + parent_version, parent_model_type, {{ dbt.listagg( measure = 'child', @@ -42,7 +44,7 @@ model_fanout_agg as ( order_by_clause = 'order by child' if target.type in ['snowflake','redshift','duckdb','trino']) }} as leaf_children from model_fanout - group by 1, 2 + group by 1, 2, 3 having count(*) >= {{ var('models_fanout_threshold') }} ) From aa106cc927c139b9262abb31236a7a4d7ecabb01 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:24:24 -0600 Subject: [PATCH 07/25] update multiple sources joined --- .../seeds/dag/test_fct_multiple_sources_joined.csv | 4 ++-- models/marts/dag/fct_multiple_sources_joined.sql | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv b/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv index 954249ce..f41217a8 100644 --- a/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv +++ b/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv @@ -1,2 +1,2 @@ -child,source_parents -stg_model_2,"source_1.table_1, source_1.table_2" +child,child_version,source_parents +stg_model_2,,"source_1.table_1, source_1.table_2" diff --git a/models/marts/dag/fct_multiple_sources_joined.sql b/models/marts/dag/fct_multiple_sources_joined.sql index 175d07c7..71561439 100644 --- a/models/marts/dag/fct_multiple_sources_joined.sql +++ b/models/marts/dag/fct_multiple_sources_joined.sql @@ -2,6 +2,7 @@ with direct_source_relationships as ( select distinct child, + child_version, parent from {{ ref('int_all_dag_relationships') }} where distance = 1 @@ -15,13 +16,14 @@ with direct_source_relationships as ( multiple_sources_joined as ( select child, + child_version, {{ dbt.listagg( measure='parent', delimiter_text="', '", order_by_clause='order by parent' if target.type in ['snowflake','redshift','duckdb','trino']) }} as source_parents from direct_source_relationships - group by 1 + group by 1, 2 having count(*) > 1 ) From 1d712835bac1634a52e72bc6e7725276ebd8b53c Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:24:50 -0600 Subject: [PATCH 08/25] update docs coverage percentage --- .../seeds/docs/test_fct_documentation_coverage.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/seeds/docs/test_fct_documentation_coverage.csv b/integration_tests/seeds/docs/test_fct_documentation_coverage.csv index 14303f45..e3fed6b7 100644 --- a/integration_tests/seeds/docs/test_fct_documentation_coverage.csv +++ b/integration_tests/seeds/docs/test_fct_documentation_coverage.csv @@ -1,2 +1,2 @@ total_models,documented_models,documentation_coverage_pct,staging_documentation_coverage_pct,intermediate_documentation_coverage_pct,marts_documentation_coverage_pct,other_documentation_coverage_pct -15,4,26.67,20.00,0.00,0.00,75.00 +17,4,23.53,20.00,0.00,0.00,75.00 From 098fc1ee6d97e68c5cd0ddd94d4a980e2bfd446b Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:27:48 -0600 Subject: [PATCH 09/25] update root models rule --- integration_tests/seeds/dag/test_fct_root_models.csv | 6 ++++-- models/marts/dag/fct_root_models.sql | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_root_models.csv b/integration_tests/seeds/dag/test_fct_root_models.csv index 0b68a2c3..4e302a34 100644 --- a/integration_tests/seeds/dag/test_fct_root_models.csv +++ b/integration_tests/seeds/dag/test_fct_root_models.csv @@ -1,2 +1,4 @@ -child -model_8 \ No newline at end of file +child,child_version +int_model_5,1 +int_model_5,3 +model_8, \ 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 45d3e997..54945234 100644 --- a/models/marts/dag/fct_root_models.sql +++ b/models/marts/dag/fct_root_models.sql @@ -14,9 +14,10 @@ with model_relationships as ( final as ( select - child + child, + child_version, from model_relationships - group by 1 + group by 1, 2 having max(distance) = 0 ) From 9cbb9f76e63bb03408ef5d90a83eecffbf5bf7cd Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:41:32 -0600 Subject: [PATCH 10/25] interim refactor --- models/marts/core/int_all_graph_resources.sql | 1 + models/marts/core/int_direct_relationships.sql | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/models/marts/core/int_all_graph_resources.sql b/models/marts/core/int_all_graph_resources.sql index 095c2bce..31f248ba 100644 --- a/models/marts/core/int_all_graph_resources.sql +++ b/models/marts/core/int_all_graph_resources.sql @@ -34,6 +34,7 @@ unioned_with_calc as ( *, case when resource_type = 'source' then {{ dbt.concat(['source_name',"'.'",'name']) }} + when version is not null then {{ dbt.concat(['name',"'.v'",'version']) }} else name end as resource_name, case diff --git a/models/marts/core/int_direct_relationships.sql b/models/marts/core/int_direct_relationships.sql index 524de221..f138ae5b 100644 --- a/models/marts/core/int_direct_relationships.sql +++ b/models/marts/core/int_direct_relationships.sql @@ -14,9 +14,7 @@ all_graph_resources as ( is_public, access, source_name, - is_excluded, - version, - deprecation_date + is_excluded from {{ ref('int_all_graph_resources') }} ), From 6926da572d73b6449d52db9b0a3c41a9ec51ad40 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:48:34 -0600 Subject: [PATCH 11/25] remove version and deprecation date from recursive sql --- macros/recursive_dag.sql | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/macros/recursive_dag.sql b/macros/recursive_dag.sql index 5604dd0d..38d1614d 100644 --- a/macros/recursive_dag.sql +++ b/macros/recursive_dag.sql @@ -28,8 +28,6 @@ all_relationships ( parent_directory_path, parent_file_name, parent_is_excluded, - parent_version, - parent_deprecation_date, child_id, child, child_resource_type, @@ -42,8 +40,6 @@ all_relationships ( child_directory_path, child_file_name, child_is_excluded, - child_version, - child_deprecation_date, distance, path, is_dependent_on_chain_of_views @@ -62,8 +58,6 @@ all_relationships ( directory_path as parent_directory_path, file_name as parent_file_name, is_excluded as parent_is_excluded, - version as parent_version, - deprecation_date as parent_deprecation_date, resource_id as child_id, resource_name as child, resource_type as child_resource_type, @@ -76,10 +70,8 @@ all_relationships ( directory_path as child_directory_path, file_name as child_file_name, is_excluded as child_is_excluded, - version as child_version, - deprecation_date as child_deprecation_date, 0 as distance, - {{ dbt.array_construct(['resource_id']) }} as path, + {{ dbt.array_construct(['resource_name']) }} as path, cast(null as boolean) as is_dependent_on_chain_of_views from direct_relationships @@ -101,8 +93,6 @@ all_relationships ( all_relationships.parent_directory_path as parent_directory_path, all_relationships.parent_file_name as parent_file_name, all_relationships.parent_is_excluded as parent_is_excluded, - all_relationships.parent_version as parent_version, - all_relationships.parent_deprecation_date as parent_deprecation_date, direct_relationships.resource_id as child_id, direct_relationships.resource_name as child, direct_relationships.resource_type as child_resource_type, @@ -115,10 +105,8 @@ all_relationships ( direct_relationships.directory_path as child_directory_path, direct_relationships.file_name as child_file_name, direct_relationships.is_excluded as child_is_excluded, - direct_relationships.version as child_version, - direct_relationships.deprecation_date as child_deprecation_date, all_relationships.distance+1 as distance, - {{ dbt.array_append('all_relationships.path', 'direct_relationships.resource_id') }} as path, + {{ dbt.array_append('all_relationships.path', 'direct_relationships.resource_name') }} as path, case when all_relationships.child_materialized in ('view', 'ephemeral') @@ -186,7 +174,7 @@ with direct_relationships as ( child_access, child_is_excluded, 0 as distance, - {{ dbt.array_construct(['resource_id']) }} as path, + {{ dbt.array_construct(['resource_name']) }} as path, cast(null as boolean) as is_dependent_on_chain_of_views from get_distinct ) @@ -202,7 +190,7 @@ with direct_relationships as ( direct_relationships.access as child_access, direct_relationships.is_excluded as child_is_excluded, cte_{{i - 1}}.distance+1 as distance, - {{ dbt.array_append(prev_cte_path, 'direct_relationships.resource_id') }} as path, + {{ dbt.array_append(prev_cte_path, 'direct_relationships.resource_name') }} as path, case when cte_{{i - 1}}.child_materialized in ('view', 'ephemeral') @@ -243,8 +231,6 @@ with direct_relationships as ( parent.directory_path as parent_directory_path, parent.file_name as parent_file_name, parent.is_excluded as parent_is_excluded, - parent.version as parent_version, - parent.deprecation_date as parent_deprecation_date, child.resource_id as child_id, child.resource_name as child, child.resource_type as child_resource_type, @@ -257,8 +243,6 @@ with direct_relationships as ( child.directory_path as child_directory_path, child.file_name as child_file_name, child.is_excluded as child_is_excluded, - child.version as child_version, - child.deprecation_date as child_deprecation_date, all_relationships_unioned.distance, all_relationships_unioned.path, all_relationships_unioned.is_dependent_on_chain_of_views From eef74356e4dd92441ef9d737c831c221d45e4d36 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:48:46 -0600 Subject: [PATCH 12/25] amend djtc --- .../seeds/dag/test_fct_direct_join_to_source.csv | 4 ++-- models/marts/dag/fct_direct_join_to_source.sql | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv b/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv index 01276d1b..7f8a6c55 100644 --- a/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv +++ b/integration_tests/seeds/dag/test_fct_direct_join_to_source.csv @@ -1,2 +1,2 @@ -parent,parent_resource_type,child,child_version,child_resource_type,distance -source_1.table_2,source,int_model_4,,model,1 \ No newline at end of file +parent,parent_resource_type,child,child_resource_type,distance +source_1.table_2,source,int_model_4,model,1 \ No newline at end of file diff --git a/models/marts/dag/fct_direct_join_to_source.sql b/models/marts/dag/fct_direct_join_to_source.sql index 7065474e..41c71c04 100644 --- a/models/marts/dag/fct_direct_join_to_source.sql +++ b/models/marts/dag/fct_direct_join_to_source.sql @@ -30,7 +30,6 @@ final as ( direct_model_relationships.parent, direct_model_relationships.parent_resource_type, direct_model_relationships.child, - direct_model_relationships.child_version, direct_model_relationships.child_resource_type, direct_model_relationships.distance from direct_model_relationships From bc6eaf70f09857dc97c54af6dda859541f430a2e Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:49:51 -0600 Subject: [PATCH 13/25] amend hcr --- .../seeds/dag/test_fct_hard_coded_references.csv | 4 ++-- models/marts/dag/fct_hard_coded_references.sql | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_hard_coded_references.csv b/integration_tests/seeds/dag/test_fct_hard_coded_references.csv index 3dcbbef2..9393447a 100644 --- a/integration_tests/seeds/dag/test_fct_hard_coded_references.csv +++ b/integration_tests/seeds/dag/test_fct_hard_coded_references.csv @@ -1,2 +1,2 @@ -model,model_version,hard_coded_references -fct_model_6,,"""my_db"".""my_schema"".""my_table"", ""my_schema"".""raw_relation_5"", ""raw_relation_2"", 'my_db'.'my_schema'.'my_table', 'my_schema'.'raw_relation_5', 'raw_relation_4', [my_db].[my_schema].[my_table], [my_schema].[raw_relation_5], [raw_relation_3], `my_db`.`my_schema`.`my_table`, `my_schema`.`raw_relation_5`, `raw_relation_1`, my_db.my_schema.my_table, my_schema.raw_relation_5, {{ var(""my_table_reference"") }}, {{ var(""my_table_reference"", ""table_d"") }}, {{ var('my_table_reference') }}, {{ var('my_table_reference', 'table_d') }}" \ No newline at end of file +model,hard_coded_references +fct_model_6,"""my_db"".""my_schema"".""my_table"", ""my_schema"".""raw_relation_5"", ""raw_relation_2"", 'my_db'.'my_schema'.'my_table', 'my_schema'.'raw_relation_5', 'raw_relation_4', [my_db].[my_schema].[my_table], [my_schema].[raw_relation_5], [raw_relation_3], `my_db`.`my_schema`.`my_table`, `my_schema`.`raw_relation_5`, `raw_relation_1`, my_db.my_schema.my_table, my_schema.raw_relation_5, {{ var(""my_table_reference"") }}, {{ var(""my_table_reference"", ""table_d"") }}, {{ var('my_table_reference') }}, {{ var('my_table_reference', 'table_d') }}" \ 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 7214a5d0..9e6a818a 100644 --- a/models/marts/dag/fct_hard_coded_references.sql +++ b/models/marts/dag/fct_hard_coded_references.sql @@ -9,7 +9,6 @@ with models as ( final as ( select resource_name as model, - version as model_version, hard_coded_references from models where hard_coded_references is not null From 03304f54b29a6842c975cc39472f4f4527bc49da Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:51:53 -0600 Subject: [PATCH 14/25] amend mf --- integration_tests/seeds/dag/test_fct_model_fanout.csv | 4 ++-- models/marts/dag/fct_model_fanout.sql | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_model_fanout.csv b/integration_tests/seeds/dag/test_fct_model_fanout.csv index d23782e6..02e84f61 100644 --- a/integration_tests/seeds/dag/test_fct_model_fanout.csv +++ b/integration_tests/seeds/dag/test_fct_model_fanout.csv @@ -1,2 +1,2 @@ -parent,parent_version,parent_model_type,leaf_children -fct_model_6,,marts,"report_1, report_2, report_3" \ No newline at end of file +parent,parent_model_type,leaf_children +fct_model_6,marts,"report_1, report_2, report_3" \ 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 a09178ea..5e7f317a 100644 --- a/models/marts/dag/fct_model_fanout.sql +++ b/models/marts/dag/fct_model_fanout.sql @@ -22,21 +22,19 @@ model_fanout as ( select all_dag_relationships.parent, all_dag_relationships.parent_model_type, - all_dag_relationships.parent_version, - {{ dbt.concat() }} all_dag_relationships.child + all_dag_relationships.child from all_dag_relationships inner join models_without_children on all_dag_relationships.child = models_without_children.parent where all_dag_relationships.distance = 1 and all_dag_relationships.child_resource_type = 'model' - group by 1, 2, 3, 4 + group by 1, 2, 3 -- we order the CTE so that listagg returns values correctly sorted for some warehouses - order by 1, 2, 3, 4 + order by 1, 2, 3 ), model_fanout_agg as ( select parent, - parent_version, parent_model_type, {{ dbt.listagg( measure = 'child', @@ -44,7 +42,7 @@ model_fanout_agg as ( order_by_clause = 'order by child' if target.type in ['snowflake','redshift','duckdb','trino']) }} as leaf_children from model_fanout - group by 1, 2, 3 + group by 1, 2 having count(*) >= {{ var('models_fanout_threshold') }} ) From a4cae2444ac37a7f0a85e06455e39943879e249e Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:53:03 -0600 Subject: [PATCH 15/25] amend msj --- .../seeds/dag/test_fct_multiple_sources_joined.csv | 4 ++-- models/marts/dag/fct_multiple_sources_joined.sql | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv b/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv index f41217a8..954249ce 100644 --- a/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv +++ b/integration_tests/seeds/dag/test_fct_multiple_sources_joined.csv @@ -1,2 +1,2 @@ -child,child_version,source_parents -stg_model_2,,"source_1.table_1, source_1.table_2" +child,source_parents +stg_model_2,"source_1.table_1, source_1.table_2" diff --git a/models/marts/dag/fct_multiple_sources_joined.sql b/models/marts/dag/fct_multiple_sources_joined.sql index 71561439..175d07c7 100644 --- a/models/marts/dag/fct_multiple_sources_joined.sql +++ b/models/marts/dag/fct_multiple_sources_joined.sql @@ -2,7 +2,6 @@ with direct_source_relationships as ( select distinct child, - child_version, parent from {{ ref('int_all_dag_relationships') }} where distance = 1 @@ -16,14 +15,13 @@ with direct_source_relationships as ( multiple_sources_joined as ( select child, - child_version, {{ dbt.listagg( measure='parent', delimiter_text="', '", order_by_clause='order by parent' if target.type in ['snowflake','redshift','duckdb','trino']) }} as source_parents from direct_source_relationships - group by 1, 2 + group by 1 having count(*) > 1 ) From 44bce77acda491379a1f67a2813a94761b042639 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:54:52 -0600 Subject: [PATCH 16/25] update rjuc --- .../seeds/dag/test_fct_rejoining_of_upstream_concepts.csv | 2 +- models/marts/dag/fct_root_models.sql | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_rejoining_of_upstream_concepts.csv b/integration_tests/seeds/dag/test_fct_rejoining_of_upstream_concepts.csv index 6b33f783..16dd9c1d 100644 --- a/integration_tests/seeds/dag/test_fct_rejoining_of_upstream_concepts.csv +++ b/integration_tests/seeds/dag/test_fct_rejoining_of_upstream_concepts.csv @@ -1,2 +1,2 @@ parent,child,parent_and_child,is_loop_independent -stg_model_1,int_model_5,int_model_4,true \ No newline at end of file +stg_model_1,int_model_5.v2,int_model_4,true \ 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 54945234..45d3e997 100644 --- a/models/marts/dag/fct_root_models.sql +++ b/models/marts/dag/fct_root_models.sql @@ -14,10 +14,9 @@ with model_relationships as ( final as ( select - child, - child_version, + child from model_relationships - group by 1, 2 + group by 1 having max(distance) = 0 ) From a14f5657b9f687274081b976cb0823b0c7817135 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:57:04 -0600 Subject: [PATCH 17/25] update seed for root models --- integration_tests/seeds/dag/test_fct_root_models.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/seeds/dag/test_fct_root_models.csv b/integration_tests/seeds/dag/test_fct_root_models.csv index 4e302a34..39f9dbaa 100644 --- a/integration_tests/seeds/dag/test_fct_root_models.csv +++ b/integration_tests/seeds/dag/test_fct_root_models.csv @@ -1,4 +1,4 @@ -child,child_version -int_model_5,1 -int_model_5,3 -model_8, \ No newline at end of file +child +int_model_5.v1 +int_model_5.v3 +model_8 \ No newline at end of file From cf6ffd7d1a37b7f8facbbd9bdd1fad952798649c Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 09:58:30 -0600 Subject: [PATCH 18/25] update undocumented models seed --- integration_tests/seeds/docs/test_fct_undocumented_models.csv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration_tests/seeds/docs/test_fct_undocumented_models.csv b/integration_tests/seeds/docs/test_fct_undocumented_models.csv index d57b3ad5..08344281 100644 --- a/integration_tests/seeds/docs/test_fct_undocumented_models.csv +++ b/integration_tests/seeds/docs/test_fct_undocumented_models.csv @@ -8,5 +8,7 @@ model_8,marts fct_model_9,marts dim_model_7,marts int_model_4,intermediate -int_model_5,intermediate +int_model_5.v1,intermediate +int_model_5.v2,intermediate +int_model_5.v3,intermediate report_3,other From 525a85476a323444b674fae7d44c053dadbf2720 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 10:00:38 -0600 Subject: [PATCH 19/25] fix cvds seed --- .../performance/test_fct_chained_views_dependencies.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/seeds/performance/test_fct_chained_views_dependencies.csv b/integration_tests/seeds/performance/test_fct_chained_views_dependencies.csv index a770e670..79e6849b 100644 --- a/integration_tests/seeds/performance/test_fct_chained_views_dependencies.csv +++ b/integration_tests/seeds/performance/test_fct_chained_views_dependencies.csv @@ -1,14 +1,14 @@ parent,child,distance stg_model_1,dim_model_7,3 -stg_model_1,int_model_5,2 +stg_model_1,int_model_5.v2,2 stg_model_2,dim_model_7,2 int_model_4,dim_model_7,2 stg_model_1,dim_model_7,2 stg_model_4,dim_model_7,1 stg_model_2,stg_model_4,1 -int_model_4,int_model_5,1 -int_model_5,dim_model_7,1 -stg_model_1,int_model_5,1 +int_model_4,int_model_5.v2,1 +int_model_5.v2,dim_model_7,1 +stg_model_1,int_model_5.v2,1 stg_model_1,int_model_4,1 fct_model_9,stg_model_5,1 stg_model_3,fct_model_6,1 \ No newline at end of file From 9043d2e9ca9a1e47d3ecf0927c5dfaf865e6a1c4 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 10:30:26 -0600 Subject: [PATCH 20/25] fix remaining seeds, remove version from test calc --- .../seeds/structure/test_fct_model_directories.csv | 4 +++- .../seeds/tests/test_fct_missing_primary_key_tests.csv | 4 +++- integration_tests/seeds/tests/test_fct_test_coverage.csv | 2 +- models/marts/tests/intermediate/int_model_test_summary.sql | 1 - 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/integration_tests/seeds/structure/test_fct_model_directories.csv b/integration_tests/seeds/structure/test_fct_model_directories.csv index 682816b5..ec377019 100644 --- a/integration_tests/seeds/structure/test_fct_model_directories.csv +++ b/integration_tests/seeds/structure/test_fct_model_directories.csv @@ -4,4 +4,6 @@ stg_model_4,models/staging/stg_model_4.sql,models/staging/source_1/stg_model_4.s stg_model_3,models/staging/source_1/stg_model_3.sql,models/staging/source_2/stg_model_3.sql dim_model_7,models/marts/intermediate/dim_model_7.sql,models/.../marts/.../dim_model_7.sql int_model_4,models/marts/int_model_4.sql,models/.../intermediate/.../int_model_4.sql -int_model_5,models/marts/int_model_5.sql,models/.../intermediate/.../int_model_5.sql \ No newline at end of file +int_model_5.v1,models/marts/int_model_5_v1.sql,models/.../intermediate/.../int_model_5_v1.sql +int_model_5.v2,models/marts/int_model_5_v2.sql,models/.../intermediate/.../int_model_5_v2.sql +int_model_5.v3,models/marts/int_model_5_v3.sql,models/.../intermediate/.../int_model_5_v3.sql \ No newline at end of file diff --git a/integration_tests/seeds/tests/test_fct_missing_primary_key_tests.csv b/integration_tests/seeds/tests/test_fct_missing_primary_key_tests.csv index 764accd0..aa50eda4 100644 --- a/integration_tests/seeds/tests/test_fct_missing_primary_key_tests.csv +++ b/integration_tests/seeds/tests/test_fct_missing_primary_key_tests.csv @@ -3,7 +3,9 @@ dim_model_7,FALSE,0 fct_model_6,FALSE,0 model_8,FALSE,0 fct_model_9,FALSE,0 -int_model_5,FALSE,0 +int_model_5.v1,FALSE,0 +int_model_5.v2,FALSE,0 +int_model_5.v3,FALSE,0 report_1,FALSE,0 report_2,FALSE,0 report_3,FALSE,0 diff --git a/integration_tests/seeds/tests/test_fct_test_coverage.csv b/integration_tests/seeds/tests/test_fct_test_coverage.csv index 5f10fc8b..c3752f6f 100644 --- a/integration_tests/seeds/tests/test_fct_test_coverage.csv +++ b/integration_tests/seeds/tests/test_fct_test_coverage.csv @@ -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 -15,13,6,40.00,80.00,50.00,0.00,25.00,0.8667 +17,13,6,35.29,80.00,25.00,0.00,25.00,0.7647 diff --git a/models/marts/tests/intermediate/int_model_test_summary.sql b/models/marts/tests/intermediate/int_model_test_summary.sql index c2704078..5a667f1a 100644 --- a/models/marts/tests/intermediate/int_model_test_summary.sql +++ b/models/marts/tests/intermediate/int_model_test_summary.sql @@ -57,7 +57,6 @@ final as ( select all_graph_resources.resource_id, all_graph_resources.resource_name, - all_graph_resources.version, all_graph_resources.resource_type, all_graph_resources.model_type, coalesce(agg_test_relationships.is_primary_key_tested, FALSE) as is_primary_key_tested, From f67ad76c7d74cd23f57826e773f9b5a38d686d72 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 10:34:32 -0600 Subject: [PATCH 21/25] revert model test summary test --- .../models/dbt_project_evaluator_schema_tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml b/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml index d48614db..e5c3745a 100644 --- a/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml +++ b/integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml @@ -4,7 +4,7 @@ models: - name: int_model_test_summary description: this model creates some initial metrics required for the downstream models related to testing columns: - - name: resource_id + - name: resource_name tests: - unique - not_null \ No newline at end of file From 52689ea3e4cccc98676a7283120782c0225d3bde Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 12 Feb 2024 10:35:38 -0600 Subject: [PATCH 22/25] revert logic change to model test summary --- models/marts/tests/intermediate/int_model_test_summary.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/models/marts/tests/intermediate/int_model_test_summary.sql b/models/marts/tests/intermediate/int_model_test_summary.sql index 5a667f1a..62b432b8 100644 --- a/models/marts/tests/intermediate/int_model_test_summary.sql +++ b/models/marts/tests/intermediate/int_model_test_summary.sql @@ -55,7 +55,6 @@ agg_test_relationships as ( final as ( select - all_graph_resources.resource_id, all_graph_resources.resource_name, all_graph_resources.resource_type, all_graph_resources.model_type, From 1efde3178bb80b884bc3258ee6076b04ba0d7ff1 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Thu, 15 Feb 2024 09:32:04 -0600 Subject: [PATCH 23/25] conditionally exclude check in duckdb due to bug with floats --- integration_tests/seeds/tests/tests_seeds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/seeds/tests/tests_seeds.yml b/integration_tests/seeds/tests/tests_seeds.yml index 25c4b238..e799cea5 100644 --- a/integration_tests/seeds/tests/tests_seeds.yml +++ b/integration_tests/seeds/tests/tests_seeds.yml @@ -23,7 +23,7 @@ seeds: - total_models - total_tests - tested_models - - test_coverage_pct + - "{{ 'test_coverage_pct' if not target.name == 'duckdb' else 'tested_models' }}" - test_to_model_ratio - staging_test_coverage_pct - intermediate_test_coverage_pct From a357a64b33738a2ad381db000bbf73b2cf82d9fd Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Thu, 28 Mar 2024 11:21:40 -0500 Subject: [PATCH 24/25] adjust seeds --- .../seeds/docs/test_fct_documentation_coverage.csv | 2 +- integration_tests/seeds/tests/test_fct_test_coverage.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_tests/seeds/docs/test_fct_documentation_coverage.csv b/integration_tests/seeds/docs/test_fct_documentation_coverage.csv index e3fed6b7..efb46e26 100644 --- a/integration_tests/seeds/docs/test_fct_documentation_coverage.csv +++ b/integration_tests/seeds/docs/test_fct_documentation_coverage.csv @@ -1,2 +1,2 @@ total_models,documented_models,documentation_coverage_pct,staging_documentation_coverage_pct,intermediate_documentation_coverage_pct,marts_documentation_coverage_pct,other_documentation_coverage_pct -17,4,23.53,20.00,0.00,0.00,75.00 +18,4,22.22,20.00,0.00,0.00,75.00 diff --git a/integration_tests/seeds/tests/test_fct_test_coverage.csv b/integration_tests/seeds/tests/test_fct_test_coverage.csv index c3752f6f..7f2a65fb 100644 --- a/integration_tests/seeds/tests/test_fct_test_coverage.csv +++ b/integration_tests/seeds/tests/test_fct_test_coverage.csv @@ -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 -17,13,6,35.29,80.00,25.00,0.00,25.00,0.7647 +18,13,6,33.33,80.00,25.00,0.00,25.00,0.7222 From 38a0417e22d1c880e0adbe878021dea3a54927d0 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Mon, 1 Apr 2024 08:56:36 -0500 Subject: [PATCH 25/25] update tests for rounding errors --- integration_tests/seeds/tests/tests_seeds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/seeds/tests/tests_seeds.yml b/integration_tests/seeds/tests/tests_seeds.yml index e799cea5..de480a01 100644 --- a/integration_tests/seeds/tests/tests_seeds.yml +++ b/integration_tests/seeds/tests/tests_seeds.yml @@ -23,7 +23,7 @@ seeds: - total_models - total_tests - tested_models - - "{{ 'test_coverage_pct' if not target.name == 'duckdb' else 'tested_models' }}" + - "{{ 'test_coverage_pct' if not target.name in ['duckdb', 'databricks', 'trino'] else 'tested_models' }}" - test_to_model_ratio - staging_test_coverage_pct - intermediate_test_coverage_pct