group
- Models
- Seeds
- Snapshots
- Tests
- Analyses
- Metrics
- Semantic models
analyses/<filename>.yml
version: 2
analyses:
- name: ANALYSIS_NAME
group: GROUP_NAME
Definition
An optional configuration for assigning a group to a resource. When a resource is grouped, dbt will allow it to reference private models within the same group.
For more details on reference access between resources in groups, check out model access.
Examples
Prevent a 'marketing' group model from referencing a private 'finance' group model
This is useful if you want to prevent other groups from building on top of models that are rapidly changing, experimental, or otherwise internal to a group or team.
models/schema.yml
models:
- name: finance_model
access: private
group: finance
- name: marketing_model
group: marketing
models/marketing_model.sql
select * from {{ ref('finance_model') }}
$ dbt run -s marketing_model
...
dbt.exceptions.DbtReferenceError: Parsing Error
Node model.jaffle_shop.marketing_model attempted to reference node model.jaffle_shop.finance_model,
which is not allowed because the referenced node is private to the finance group.
Related docs
0