Self-Assessment Quiz: CI/CD for Data Pipelines
Twenty questions. Aim for 16 or more. Questions 8, 13, and 18 are the three this chapter's two incidents turn on.
Question 1
Which is not one of the four ways data CI/CD is harder?
- A. You cannot easily test against realistic data
- B. The build is slow and expensive
- C. Data code is harder to write
- D. There is no rollback for data
Question 2
Three of those four resolve to:
- A. A tool purchase
- B. "Accept something" — they are trades, not best practices
- C. More testing
- D. A bigger staging environment
Question 3
CI stages should be ordered by:
- A. Alphabetically
- B. What they catch per second
- C. Cost
- D. Team preference
Question 4
Which stages need no warehouse at all?
- A. None
- B. Lint, parse, policy lints, unit tests
- C. Only lint
- D. All of them
Question 5
A 1% random sample of Kestrel's orders contains at least one of the twelve wholesale distributors with probability:
- A. 12%
- B. 11.4%
- C. 1%
- D. 88%
Question 6
Which clause of a deliberate sample should you build first?
- A. The random sample
- B. Every row that has ever caused a test to fail
- C. The extremes of every measure
- D. Structurally unusual entities
Question 7
Slim CI against a missing manifest:
- A. Fails loudly
- B. Selects nothing, builds nothing, and exits 0
- C. Falls back automatically
- D. Rebuilds everything
Question 8
Which is the primary fix for that?
- A. Fail the job if the manifest is missing
- B. Assert that the build produced more than zero models
- C. Retry the download
- D. Cache the manifest longer
Question 9
Slim CI cannot see:
- A. Nothing; it is complete
- B. A hardcoded reference, a shared target, some macro changes, and anything outside dbt
- C. Only macro changes
- D. Test failures
Question 10
A data staging environment holding a 1% sample:
- A. Is representative
- B. Does not contain the row that breaks the model
- C. Is the industry standard
- D. Costs nothing
Question 11
Kestrel deleted its staging environment because:
- A. Budget cuts
- B. In eighteen months it never once caught something the slim build did not
- C. It was unmaintained
- D. Compliance required it
Question 12
The three deploy shapes are additive, structural, and:
- A. Incremental
- B. Definitional
- C. Emergency
- D. Rolling
Question 13
Treating a definitional change as additive produces:
- A. A slower build
- B. A table whose meaning changes at a date nobody recorded
- C. A test failure
- D. Duplicate rows
Question 14
When you fix a definition, the three options are rebuild, do not rebuild and record the boundary, and:
- A. Roll back
- B. Do not rebuild and do not record it — which is the absence of a decision
- C. Delete the column
- D. Version the model
Question 15
Which cannot be rolled back at all?
- A. Code
- B. Table contents inside the retention window
- C. A schema migration
- D. Data sent downstream
Question 16
A shadow deploy's gate should be:
- A. Zero rows different
- B. Only the differences you intended, and no others
- C. Under 1% different
- D. The same row count
Question 17
pr_report.py classifies conservatively because:
- A. It is easier to implement
- B. A false definitional costs thirty seconds; a false additive costs eleven weeks
- C. dbt requires it
- D. It reduces build time
Question 18
"Do not X; instead Y" is dangerous as a requirement because:
- A. It is ambiguous
- B. It is two requirements, and the negative one is easier and is what gets implemented alone
- C. It cannot be tested
- D. It is too long
Question 19
A reviewer's attention should go to:
- A. Hardcoded references
- B. The deploy shape, whether the definition is right, whether the grain changed, and who downstream should be told
- C. Formatting
- D. Test coverage counts
Question 20
Renaming an Airflow task:
- A. Is a cosmetic change
- B. Is a structural change to a historical record — history is keyed on
task_id - C. Requires a migration
- D. Is prevented by the scheduler
Answer Key
1. C — §27.1. Data code is not intrinsically harder to write; the difficulty is entirely in the other three plus the staging problem.
2. B — §27.1's 📐 callout. A team that has not named what it gave up gave up something anyway.
3. B — §27.2. So a bad change fails at second three, not minute eleven.
4. B — §27.2. They run on a laptop, in a container, in a fork, with no credentials.
5. B — §27.3. $1 - 0.99^{12} = 11.4\%$ — so the shape you tested against is missing the entity that causes Chapter 21's skew nine times out of ten.
6. B — §27.3. Every row that has failed a test has proven it can break something. A fixture set that grows by one row per incident is the cheapest regression suite in this book.
7. B — §27.4 and Case Study 2. PASS=0 WARN=0 ERROR=0 SKIP=0 TOTAL=0, exit 0, for nine weeks.
8. B — Case Study 2. Assert that the check RAN, not that it passed. Failing on a missing manifest was rejected — it punishes an uninvolved person and gets an exception carved into it.
9. B — §27.4's ⚠️ callout. Slim CI is a latency optimization, not a coverage one.
10. B — §27.1, §27.5.
11. B — §27.5. A 5% sample, eighteen months, $340 a month.
12. B — §27.7.
13. B — Case Study 1. Chapter 20 Case Study 1's "a trap with a timestamp on it," created by a deploy.
14. B — Case Study 1's ⚠️ callout. It is the default because shipping the code is the half with a button.
15. D — §27.8. An export, an email, a vendor API call. So make the irreversible step last, after the assertions.
16. B — §27.9. A definitional change should produce differences.
17. B — Case Study 1's 📐 callout. And the false positives are not waste: each is a recorded claim that history is consistent.
18. B — Case Study 2's 🔎 callout. Write the positive clause first and test the negative path.
19. B — §27.10. If a defect is invisible in the artifact under review, no amount of diligence is the fix.
20. B — §27.11's ⚠️ callout. Keep task_id stable and rename the function.
Topic map
| Missed | Reread |
|---|---|
| 1, 2 | §27.1 — the four differences |
| 3, 4 | §27.2 — ordering by yield |
| 5, 6 | §27.3 — testing without production data |
| 7, 8, 9 | §27.4 and Case Study 2 — slim CI |
| 10, 11 | §27.5 — environments |
| 12, 13, 14, 17 | §27.7 and Case Study 1 — deploy shape |
| 15, 16 | §27.8, §27.9 — rollback, shadow, blue-green |
| 18 | Case Study 2 — two-part requirements |
| 19 | §27.10 — reviewing |
| 20 | §27.11 — deploying the orchestrator |