This functionality is new in v1.5.
- name: model_name
access: private | protected | public
Access modifiers may be applied to models one-by-one in YAML properties. It is not currently possible to configure
access for multiple models at once. A group or subfolder contains models with a variety of access levels, and designating a model with
access: public should always be a conscious and intentional choice.
The access level of the model you are declaring properties for.
|public||any group, package or project|
If you try to reference a model outside of its supported access, you will see an error:
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.
By default, all models are "protected." This means that other models in the same project can reference them.