Documentation Flashcards

(40 cards)

1
Q

What is the primary purpose of documentation in a dbt project?

A

The primary purpose is to help downstream consumers discover and understand curated datasets. Documentation enhances clarity, trust, and usability of dbt models.

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

How can dbt documentation be rendered for users to view?

A

It can be rendered as a website using dbt Docs or enhanced interfaces like Catalog, depending on the dbt plan.

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

What is required before generating documentation for dbt models?

A

You must add descriptions to project resources in YAML files where tests are declared.

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

Where do you add descriptions for models and columns in dbt?

A

In YAML files such as models/<filename>.yml, using the description: key under each model and column.

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

What does the dbt docs generate command do?

A

It compiles information about your dbt project and warehouse into manifest.json and catalog.json files.

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

What does the dbt docs serve command do?

A

It launches a local web server that uses the JSON files to render the documentation website.

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

What is the purpose of the doc() Jinja function in dbt documentation?

A

It allows referencing markdown content from docs blocks within YAML descriptions.

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

What are docs blocks in dbt, and how are they defined?

A

Docs blocks are markdown content defined using Jinja tags {% docs block_name %}...{% enddocs %} in .md files.

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

How do you use a docs block within a schema.yml file?

A

By referencing it using description: '{{ doc(\"block_name\") }}', which pulls in the markdown content.

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

Where should docs block files be saved in a dbt project?

A

In any resource path such as model-paths, seed-paths, etc., typically with a .md extension.

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

What is the function of the \_\_overview\_\_ docs block?

A

It overrides the default overview in dbt Docs with custom content such as company-specific guides or contact info.

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

Can different dbt packages have custom overview pages?

A

Yes, by defining docs blocks like \_\_dbt_utils\_\_ or \_\_snowplow\_\_ for each package.

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

What type of content can go into a docs block?

A

Markdown content including headers, bullet lists, and links to provide long-form documentation.

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

Do you need to add a YAML entry for a column for it to appear on the docs site?

A

Yes, columns must be explicitly defined in YAML with a name and optional description.

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

Is it possible to document sources, seeds, and snapshots in dbt?

A

Yes, documentation can be added to these resources similarly to models.

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

How does dbt Copilot assist with documentation?

A

It helps generate documentation automatically in the Studio IDE for dbt Enterprise and Enterprise+ users.

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

What are docs blocks in dbt and what is their purpose?

A

Docs blocks in dbt are markdown-based documentation sections defined using Jinja. They provide a flexible way to write rich, structured documentation for models and other resources.

18
Q

What is the correct Jinja syntax for declaring a docs block?

A

Use {% docs block_name %}...{% enddocs %} to declare a docs block, where block_name is a unique identifier.

19
Q

What characters are allowed in a docs block name?

A

Docs block names can include uppercase and lowercase letters, digits, and underscores, but must not start with a digit.

20
Q

Can docs blocks contain arbitrary markdown?

A

Yes, they can include any markdown content, such as headers, lists, and links, providing flexibility in how documentation is written.

21
Q

Where should docs blocks be saved in a dbt project?

A

Docs blocks should be placed in .md files located in resource paths like model-paths, seed-paths, and others.

22
Q

How is a docs block used in a schema.yml file?

A

By referencing it using the Jinja doc() function, like description: '{{ doc(\"block_name\") }}' within the YAML.

23
Q

In the example provided, what does the {{ doc(\"table_events\") }} expression do?

A

It embeds the content of the table_events docs block into the description field of the model in the documentation.

24
Q

Why must docs block names be unique within a dbt project?

A

To avoid conflicts and ensure that each doc() reference unambiguously maps to a single markdown block.

25
What is the default file extension for docs block files in dbt?
`.md` is the required extension for docs block files to be recognized and parsed by dbt.
26
How does dbt locate docs blocks across a project?
dbt searches all configured resource paths by default, but this can be customized with the `docs-paths` configuration.
27
What are the two main options for viewing dbt documentation?
The two options are: dbt Docs, which generates a static documentation site, and Catalog, a dynamic, real-time interface with enhanced features.
28
What is dbt Docs and who can access it?
dbt Docs generates a static site with model lineage and metadata and is available to users on dbt Core or Developer plans.
29
What is Catalog in dbt and who has access to it?
Catalog is a dynamic documentation experience with real-time updates, metadata exploration, and collaboration tools, available on dbt Starter, Enterprise, or Enterprise+ plans.
30
What interface in dbt gives interactive access to project models and lineage?
The dbt Explorer within Catalog provides an interactive view of models, their lineage, and metadata.
31
What is the function of the DAG mini-map in dbt Docs?
It visually displays the immediate parents and children of a model, helping users understand model dependencies and relationships.
32
How is the DAG mini-map accessed in dbt Docs?
Click the green button in the bottom-right corner of the docs webpage to open the mini-map and explore model lineage.
33
What kind of metadata does Catalog automatically capture and display?
Catalog displays model performance, test coverage suggestions, data health signals, model query history, and downstream exposures.
34
What happens when a production or staging job runs in Catalog?
Catalog automatically updates its documentation using the latest metadata from the job run, ensuring real-time accuracy.
35
How can dbt Docs be hosted for team access?
It can be hosted on Amazon S3 (with optional IP restrictions), published with Netlify, or served via Apache/Nginx.
36
Is the `dbt docs serve` command suitable for production deployment?
No, it is intended only for local or development use. For secure deployment, use a proper hosting service.
37
What does the resource search bar in Catalog enable?
It helps users find specific project resources efficiently using comprehensive filters.
38
What are 'downstream exposures' in Catalog?
These are integrations with tools like Tableau that show how data models are consumed outside of dbt.
39
How does Catalog assist with test coverage and documentation improvements?
Catalog provides project recommendations for improving test coverage and resource documentation.
40
What feature in Catalog helps understand how a model is being used?
Model query history provides a log of how and when models are queried, revealing their usage patterns.