Model groups
Last updated
Was this helpful?
Last updated
Was this helpful?
Models can be grouped under a common designation with a shared owner. For example, you could group together all models owned by a particular team, or related to modeling a specific data source (hubspot
).
Groups transforms implicit relationships into explicit groupings with a defined owner. By defining interface boundaries between groups, you can create a cleaner, less entangled DAG.
This approach allows you to designate certain models as having "private" access, intended for exclusive use within that group. Other models will be restricted from referencing or depending on these private models. Eventually, these private models won't be visible to other teams relying on your project—only the "public" models will be accessible.
A group is a collection of nodes within a dbt DAG. Groups are named, and every group has an owner
. They enable intentional collaboration within and across teams by restricting models.
Groups are defined in .yml
files, nested under a groups:
key.
Use the group
configuration to add one or more models to a group.
By default, all models within a group have the protected
. This means they can be referenced by downstream resources in any group in the same project, using the ref
function. If a grouped model's access
property is set to private
, only resources within its group can reference it.