Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ flags:
require_nested_cumulative_type_params: True
require_yaml_configuration_for_mf_time_spines: True
require_generic_test_arguments_property: True
require_ref_prefers_node_package_to_root: True

models:
dbt_project_evaluator_integration_tests:
Expand All @@ -53,7 +54,7 @@ tests:
+enabled: false
dbt_project_evaluator_integration_tests:
dbt_project_evaluator_schema_tests:
unique_int_all_dag_relationships_path:
unique_int_all_dag_relationships_dpe_path:
# Grouping by expressions of type ARRAY is not allowed for BigQuery
+enabled: "{{ false if target.type in ['bigquery'] else true }}"

Expand All @@ -67,7 +68,7 @@ vars:
deactivate_for_fusion: false
# ensure integration tests run successfully when there are 0 of a given model type (extra)
exclude_packages: ['exclude_package']
exclude_paths_from_project: ["/to_exclude/","source_3.table_6"]
exclude_paths_from_project: ["/to_exclude/","source_3.table_6","/dbt_project_evaluator_schema_tests/"]
model_types: ['base','staging', 'intermediate', 'marts', 'other', 'extra', 'new_model_type']
# dummy variable used for testing fct_hard_coded_references
my_table_reference: 'grace_table'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: 2

models:
- name: int_all_dag_relationships
- name: int_all_dag_relationships_dpe
description: "This table shows one record for every resource and each of its downstream children (including itself). It includes models, snapshots, exposures, metrics and seeds"
columns:
- name: path
description: unique identifier representing a distinct path from each resource to another resource
data_tests:
- unique
- not_null
- not_null

- name: int_all_graph_resources
- name: int_all_graph_resources_dpe
description: "This table shows one record for each enabled resource in the graph and information about that resource."
columns:
- name: resource_id
Expand All @@ -22,15 +22,16 @@ models:
data_tests:
- not_null:
config:
where: resource_type = 'model'
where: "resource_type = 'model' and materialized = 'incremental'"
- name: model_type
data_tests:
data_tests:
- dbt_utils.expression_is_true:
expression: "= 'base'"
arguments:
expression: "= 'base'"
config:
where: "resource_name = 'base_model_10'"

- name: int_direct_relationships
- name: int_direct_relationships_dpe
description: "This table shows one record for each direct parent/child pair in the graph."
columns:
- name: unique_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,91 +1,94 @@
version: 2

models:
- name: stg_exposure_relationships
- name: stg_exposure_relationships_dpe
description: "Staging model from the graph variable, one record per exposure resource relationship (comes from the depends_on field in the graph)."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_exposures
- name: stg_exposures_dpe
description: "Staging model from the graph variable, one record per exposure resource."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_metric_relationships
- name: stg_metric_relationships_dpe
description: "Staging model from the graph variable, one record per metric resource relationship (comes from the depends_on field in the graph)."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_metrics
- name: stg_metrics_dpe
description: "Staging model from the graph variable, one record per metric resource."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_node_relationships
- name: stg_node_relationships_dpe
description: "Staging model from the graph variable, one record per direct node relationship (comes from the depends_on field in the graph)."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_nodes
- name: stg_nodes_dpe
description: "Staging model from the graph variable, one record per node (analysis, model, operation, seed, snapshot, test)."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_columns
- name: stg_columns_dpe
description: "Staging model from the graph variable, one record per column resource."
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- node_unique_id
- name
arguments:
combination_of_columns:
- node_unique_id
- name

- name: stg_sources
- name: stg_sources_dpe
description: "Staging model from the graph variable, one record per source resource."
columns:
- name: unique_id
data_tests:
- unique
- not_null

- name: stg_naming_convention_folders
- name: stg_naming_convention_folders_dpe
description: "This table parses the folder name variables into a model to help define structure tests"
columns:
- name: folder_name
data_tests:
- unique
- not_null
- name: model_type
- name: model_type
data_tests:
- accepted_values:
values: "{{ var('model_types') }}"
arguments:
values: "{{ var('model_types') }}"

- name: stg_naming_convention_prefixes
- name: stg_naming_convention_prefixes_dpe
description: "This table shows one record for each accepted model prefix for each model type (staging, intermediate, marts) from the provided variables"
columns:
- name: unique_id
description: surrogate key of model_type and prefix value
data_tests:
- unique
- not_null
- name: model_type
- name: model_type
data_tests:
- accepted_values:
values: "{{ var('model_types') }}"
arguments:
values: "{{ var('model_types') }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'int_all_dag_relationships') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'int_all_graph_resources') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'int_direct_relationships') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'int_model_test_summary') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_columns') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_exposure_relationships') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_exposures') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_metric_relationships') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_metrics') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_naming_convention_folders') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_naming_convention_prefixes') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_node_relationships') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_nodes') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select * from {{ ref('dbt_project_evaluator', 'stg_sources') }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2

models:
- name: int_model_test_summary
- name: int_model_test_summary_dpe
description: this model creates some initial metrics required for the downstream models related to testing
columns:
- name: resource_name
data_tests:
- unique
- not_null
- unique
- not_null
Loading