Exposures Flashcards

(15 cards)

1
Q

What is a dbt exposure?

A

A dbt exposure is a documentation artifact that describes how data is used outside of dbt, such as in dashboards, notebooks, or applications. It helps track data lineage to end use cases.

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

Where should an exposure be defined in a dbt project?

A

An exposure should be defined in a YAML file within the models/ directory, typically named models/<filename>.yml.

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

What are the required properties for defining a dbt exposure?

A

The required properties are: name (unique and in snake_case), type (e.g., dashboard, notebook), and owner (with a required name or email).

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

What values are allowed for the type property in a dbt exposure?

A

Valid values for type include: dashboard, notebook, analysis, ml, and application. These categorize how the exposure is used.

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

What is the purpose of the owner field in an exposure definition?

A

The owner field documents the responsible party for the exposure, requiring at least a name or email, and can include additional metadata.

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

What does the depends_on property specify in an exposure?

A

depends_on lists the dbt objects that the exposure relies on, such as models (ref()), sources (source()), and metrics (metric()).

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

Why is it unusual for an exposure to directly depend on a source?

A

While technically possible, it’s uncommon because exposures typically depend on transformed models rather than raw source data.

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

What does the label field do in a dbt exposure?

A

The label provides a human-readable name for the exposure that may contain spaces and special characters, improving documentation clarity.

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

What is the role of the url property in a dbt exposure?

A

The url links the exposure to its external resource (e.g., a dashboard), enabling a ‘View this exposure’ link in dbt Docs.

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

What does the maturity property represent in a dbt exposure?

A

The maturity level indicates confidence or stability, with values such as high, medium, or low, guiding stakeholders on trust levels.

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

What are some optional general properties for exposures?

A

Optional properties include description, tags, meta, and enabled. These enhance documentation and control exposure visibility.

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

How do you reference an exposure in dbt CLI commands?

A

You can reference an exposure using the +exposure:<exposure_name> syntax, for example: dbt run -s +exposure:weekly_jaffle_report.

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

Where do exposures appear in dbt Explorer?

A

Exposures are listed under the ‘Resources’ tab and shown as nodes in the DAG with an orange ‘EXP’ indicator.

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

What visual cue identifies exposures in the dbt DAG?

A

In the dbt DAG, exposures are marked with an orange ‘EXP’ icon, distinguishing them from other node types.

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

How does defining exposures improve a dbt project?

A

Exposures help map the downstream usage of data models, increasing transparency, traceability, and accountability across the data stack.

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