mirror of
https://github.com/dbt-labs/dbt-project-evaluator.git
synced 2025-12-18 02:11:27 +00:00
add excluded package
This commit is contained in:
@@ -59,7 +59,7 @@ seeds:
|
||||
|
||||
vars:
|
||||
# ensure integration tests run successfully when there are 0 of a given model type (extra)
|
||||
exclude_packages: []
|
||||
exclude_packages: ['exclude_package']
|
||||
exclude_paths_from_project: ["/to_exclude/","source_3.table_6"]
|
||||
model_types: ['staging', 'intermediate', 'marts', 'other', 'extra', 'new_model_type']
|
||||
# dummy variable used for testing fct_hard_coded_references
|
||||
|
||||
30
integration_tests/exclude_package/dbt_project.yml
Normal file
30
integration_tests/exclude_package/dbt_project.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
# Name your project! Project names should contain only lowercase characters
|
||||
# and underscores. A good package name should reflect your organization's
|
||||
# name or the intended use of these models
|
||||
name: 'exclude_package'
|
||||
version: '1.0.0'
|
||||
config-version: 2
|
||||
|
||||
# This setting configures which "profile" dbt uses for this project.
|
||||
profile: 'integration_tests'
|
||||
|
||||
# These configurations specify where dbt should look for different types of files.
|
||||
# The `source-paths` config, for example, states that models in this project can be
|
||||
# found in the "models/" directory. You probably won't need to change these!
|
||||
model-paths: ["models"]
|
||||
analysis-paths: ["analysis"]
|
||||
test-paths: ["tests"]
|
||||
seed-paths: ["seeds"]
|
||||
macro-paths: ["macros"]
|
||||
snapshot-paths: ["snapshots"]
|
||||
|
||||
target-path: "target" # directory which will store compiled SQL files
|
||||
clean-targets: # directories to be removed by `dbt clean`
|
||||
- "target"
|
||||
- "dbt_packages"
|
||||
|
||||
models:
|
||||
exclude_package:
|
||||
# materialize as ephemeral to prevent the fake models from executing, but keep them enabled
|
||||
+materialized: view
|
||||
11
integration_tests/exclude_package/models/_models.yml
Normal file
11
integration_tests/exclude_package/models/_models.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
models:
|
||||
- name: excluded_model
|
||||
access: public
|
||||
config:
|
||||
contract:
|
||||
enforced: true
|
||||
columns:
|
||||
- name: id
|
||||
data_type: integer
|
||||
- name: data_quality
|
||||
data_type: "{{ 'string' if target.type in ['bigquery', 'databricks'] else 'text' }}"
|
||||
@@ -0,0 +1,3 @@
|
||||
select
|
||||
1 as id,
|
||||
'good' as data_quality
|
||||
@@ -1,2 +1,3 @@
|
||||
packages:
|
||||
- local: ../
|
||||
- local: ../
|
||||
- local: exclude_package/
|
||||
@@ -9,6 +9,7 @@ direct_exposure_relationships as (
|
||||
parent_resource_type = 'model'
|
||||
and parent_is_public
|
||||
)
|
||||
and not parent_is_excluded
|
||||
),
|
||||
|
||||
final as (
|
||||
|
||||
@@ -2,6 +2,7 @@ with
|
||||
|
||||
all_resources as (
|
||||
select * from {{ ref('int_all_graph_resources') }}
|
||||
where not is_excluded
|
||||
),
|
||||
|
||||
final as (
|
||||
|
||||
@@ -2,6 +2,7 @@ with
|
||||
|
||||
all_resources as (
|
||||
select * from {{ ref('int_all_graph_resources') }}
|
||||
where not is_excluded
|
||||
),
|
||||
|
||||
final as (
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
with all_graph_resources as (
|
||||
select * from {{ ref('int_all_graph_resources') }}
|
||||
where not is_excluded
|
||||
),
|
||||
|
||||
folders as (
|
||||
|
||||
Reference in New Issue
Block a user