0
0
dbtdata~10 mins

Group-based ownership in dbt - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Group-based ownership
Define Groups
Assign Owners to Groups
Assign Models to Groups
Set Group Permissions
Users inherit Group Permissions
Access Control Enforced
This flow shows how groups are defined, assigned owners and models, permissions set, and users inherit access in dbt.
Execution Sample
dbt
groups:
  - name: analytics_team
    owners:
      - alice
      - bob
    models:
      - sales_data
      - customer_data
Defines a group 'analytics_team' with owners and assigns models to the group for ownership.
Execution Table
StepActionInputResultNotes
1Define groupName: analytics_teamGroup 'analytics_team' createdGroup container ready
2Assign ownersOwners: alice, bobOwners linked to groupOwners can manage group's models
3Assign modelsModels: sales_data, customer_dataModels linked to groupGroup owns these models
4Set permissionsDefault group permissionsPermissions set for groupControls access for group members
5User joins groupUser: charlieUser inherits group permissionsUser can access group's models
6Access checkUser requests model accessAccess granted if in groupEnforces group-based ownership
7ExitNo more actionsProcess completeOwnership and access established
💡 All groups defined, owners and models assigned, permissions set, and users inherit access accordingly.
Variable Tracker
VariableStartAfter Step 2After Step 3After Step 5Final
groupsempty['analytics_team']['analytics_team' with models]['analytics_team' with models, user charlie added]Final group ownership and user access
Key Moments - 2 Insights
How does a user get access to models owned by a group?
Users inherit permissions by being members of the group owning the models, as shown in step 5 and 6 of the execution table.
Can a model be owned by multiple groups?
Typically, a model is assigned to one group owner to avoid permission conflicts, as shown in step 3 where models are linked to a single group.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, at which step are owners assigned to the group?
AStep 1
BStep 2
CStep 3
DStep 4
💡 Hint
Check the 'Action' column for 'Assign owners' in the execution table.
According to the variable tracker, what is the state of 'groups' after step 3?
AEmpty list
BList with group but no models
CList with group and models assigned
DList with group and users assigned
💡 Hint
Look at the 'After Step 3' column for 'groups' in the variable tracker.
If a user is not added to any group, what happens when they request access to a model?
AAccess denied because no group membership
BAccess granted by default
CAccess granted if model is public
DAccess granted if user is owner
💡 Hint
Refer to step 6 in the execution table about access checks.
Concept Snapshot
Group-based ownership in dbt:
- Define groups with names
- Assign owners to groups
- Assign models to groups
- Set permissions at group level
- Users inherit permissions by group membership
- Access controlled by group ownership
Full Transcript
Group-based ownership in dbt means you create groups, assign owners and models to these groups, and set permissions for the group. Users who belong to a group inherit the permissions of that group. When a user requests access to a model, dbt checks if the user is in the group that owns the model. If yes, access is granted. This way, managing access is easier by controlling group membership instead of individual users.