Self-Assessment Quiz: dbt
Twenty questions. Aim for 16 or more.
Question 1
dbt is best described as:
- A. A data warehouse
- B. A templating engine, a dependency graph inferred from
ref(), and a test runner - C. An orchestrator
- D. An ELT platform that extracts, loads, and transforms
Question 2
dbt runs your transformation compute:
- A. On dbt's own workers
- B. Never — it sends SQL to a warehouse, which does the work
- C. On Spark
- D. Locally, then uploads results
Question 3
A dbt model file contains:
- A.
CREATE TABLE AS SELECT - B. One
SELECT - C. A transaction
- D. Whatever DDL the materialization needs
Question 4
Replacing {{ ref('stg_orders') }} with analytics.stg_orders:
- A. Fails to compile
- B. Compiles, runs, returns correct results, and deletes a DAG edge
- C. Fails at runtime
- D. Works identically
Question 5
Which consequence of that substitution is the most insidious?
- A. It is slower
- B. Slim CI will not test the model, because it is not a descendant of anything modified
- C. The docs page is missing
- D. It uses more warehouse credits
Question 6
A view materialization is:
- A. Free
- B. Free to build, and recomputed on every query
- C. Expensive to build, cheap to query
- D. Only for staging
Question 7
An ephemeral model referenced by six models is computed:
- A. Once
- B. Six times — it is inlined as a CTE into each caller
- C. Once per run
- D. Zero times
Question 8
The right size for a dbt model is:
- A. Under 100 lines
- B. One join
- C. The largest unit you would be willing to test as a whole
- D. One CTE
Question 9
Jinja has gone too far when:
- A. You use a
forloop - B. You must compile the model to know what SQL it produces
- C. You use
is_incremental() - D. You write a macro
Question 10
A loop over a query result in a model is:
- A. Fine
- B. A build-time dependency that is invisible in the DAG
- C. Faster than a literal list
- D. Required for dynamic pivots
Question 11
dbt build differs from dbt run && dbt test in that:
- A. It is faster
- B. A failed test stops downstream models, so the mart holds yesterday's correct data
- C. It runs tests first
- D. It skips snapshots
Question 12
A dbt project with 400 tests and a 100% pass rate for eight months is:
- A. Well tested
- B. Possibly untested — for each test, ask what upstream change would make it fail
- C. Over-tested
- D. Correctly configured
Question 13
When the ingestion pipeline lands nothing overnight, dbt build:
- A. Fails
- B. Succeeds, with every model built and every test passing
- C. Warns
- D. Skips the affected models
Question 14
The only thing in dbt that catches it is:
- A.
not_null - B.
dbt source freshness, which is a separate commanddbt builddoes not run - C.
relationships - D.
dbt docs generate
Question 15
dbt build --select "tag:finance,tag:hourly" selects models with:
- A. Either tag
- B. Both tags — comma is intersection
- C. Neither
- D. The first tag only
Question 16
--defer allows CI to:
- A. Skip tests
- B. Resolve
ref()s to models not in the current run against production relations - C. Run models in parallel
- D. Cache results
Question 17
profiles.yml should:
- A. Be committed so the team shares it
- B. Be gitignored, with credentials supplied by
env_var() - C. Contain production passwords for reproducibility
- D. Live inside
models/
Question 18
The unknown-member pattern (COALESCE(key, -1)):
- A. Is wrong and should be removed
- B. Is correct, and converts a loud referential-integrity failure into a quiet data quality one
- C. Makes
relationshipstests stricter - D. Only applies to date dimensions
Question 19
Which assertion would have caught Case Study 1's missing day?
- A.
uniqueon the grain - B.
not_nullon every column - C. A volume assertion with a floor well below the expected value
- D.
relationshipsto the customer dimension
Question 20
"The pipeline is fixed" and "the data is fixed" differ because:
- A. They do not
- B. Rows written during an incident fall below an incremental model's watermark and are never revisited
- C. The pipeline runs first
- D. dbt repairs data automatically on the next run
Answer Key
1. B — §19.1. Everything else is built on those three.
2. B — §19.1. dbt's own process is small enough to run on a laptop while the query it dispatched consumes a hundred nodes.
3. B — §19.2. Separating the query from its persistence is the core idea; the boilerplate dbt replaced is where the bugs lived.
4. B — §19.3. Which is why review does not catch it: the diff looks like a correct change.
5. B — §19.3. The one place you would have caught the problem is the place the problem disables.
6. B — §19.4. Kestrel's four-view chain cost $2,845 a month more than the same models as tables.
7. B — §19.4, 📐 callout. And no cost report attributes the multiplication to it.
8. C — §19.5. If you can state one assertion meaning "this model is correct," it is the right size.
9. B — §19.6. You have written a program that writes SQL, and you now own two things.
10. B — §19.6. It runs during parsing and fails with error messages pointing at the wrong file.
11. B — §19.7, 🔎 callout. Stale beats wrong, and it is not close.
12. B — §19.7. A pass rate is being read as evidence.
13. B — §19.8. Structural: dbt transforms what is in the warehouse and cannot know what should have been.
14. B — §19.8. And Case Study 2's version was configured, correct, and never invoked.
15. B — §19.12. Space is union. A scheduled job with the wrong one builds a subset and reports success.
16. B — §19.14. Twelve models built against real production upstreams instead of ninety.
17. B — §19.13. It is the most commonly committed secret in the data world, by well-meaning people, because it looks like configuration.
18. B — Case Study 2. You still want it; the alternative silently drops rows from every aggregation. It just creates a monitoring obligation.
19. C — Case Study 1, 🔎 callout. A, B, and D all pass on an empty table — every standard dbt test describes rows that exist.
20. B — Case Study 2. The remediation everyone does makes the symptom go away; the one nobody does is the one nothing will report as missing.
Topic map
| Missed | Reread |
|---|---|
| 1, 2 | §19.1 — what dbt is and is not |
| 3 | §19.2 — the model is a SELECT |
| 4, 5, 19 | §19.3 and Case Study 1 — ref() |
| 6, 7 | §19.4 — materializations |
| 8 | §19.5 — layout and model size |
| 9, 10 | §19.6 — Jinja |
| 11, 12 | §19.7 — tests |
| 13, 14, 18, 20 | §19.8 and Case Study 2 — freshness and silence |
| 15 | §19.12 — node selection |
| 17 | §19.13 — environments |
| 16 | §19.14 — slim CI |