groups Flashcards

(12 cards)

1
Q

What is a dbt group?

A

A dbt group is a named collection of nodes in the dbt DAG that share an owner and can be used to manage access and collaboration within or across teams.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which dbt nodes can be included in a group?

A

Groups can include models, tests, seeds, snapshots, analyses, and metrics. Sources and exposures cannot be included in a group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many groups can a dbt node belong to?

A

Each node can belong to only one group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is a dbt group declared in a project?

A

A group is declared in a YAML file under the groups: key, with required name and owner fields, and optional description and config.meta fields.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is required when declaring the owner of a group?

A

The owner must include a name or email. Additional properties are currently allowed but will be disallowed in future releases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you add a model to a dbt group?

A

You can add a model to a group using the +group configuration either at the project level in dbt_project.yml, at the model-level config, or inline within the YAML model definitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the default access level for models in a group?

A

By default, grouped models have the protected access level, meaning they can be referenced by other resources in the same project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens when a grouped model’s access is set to private?

A

When a model’s access is set to private, only other resources within the same group can reference it using ref().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What error occurs if a model in another group tries to reference a private model?

A

A DbtReferenceError will occur, indicating that the model being referenced is private and cannot be accessed by a model in a different group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where is the group assigned in dbt_project.yml?

A

In dbt_project.yml, the group is assigned under the models: section using the +group: key at the appropriate namespace level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you use ref() to access models across groups?

A

Yes, but only if the model being referenced has the protected access level. private models cannot be referenced across groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do groups help with team collaboration in dbt?

A

Groups support intentional collaboration by organizing related resources, enforcing access boundaries, and assigning clear ownership, enhancing governance and modularity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly