fix(week10): correct WARN-severity guidance + add INNER JOIN hint#3
Merged
Conversation
Two student-facing fixes found by building the assignment against live
Azure Postgres:
- Singular-test stub claimed severity is "set in dbt_project.yml". The
template ships no dbt_project.yml (students dbt init their own), and a
project-level severity would silently downgrade the not_null /
unique_combination PK tests. Point students at an inline
{{ config(severity='warn') }} instead.
- Mart stub said only "join trips to zones". A pickup_location_id with no
matching zone (e.g. 999) becomes NULL borough under a LEFT JOIN and fails
the not_null PK test. Tell students to INNER JOIN so pickup_borough stays
non-null and the mart lands at the rubric's 184 rows.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLwBsooLgWEkUqJYVK7FsU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two small, student-facing scaffold fixes surfaced by building the Week 10 assignment end-to-end against the live
nyc_taxitables on Azure Postgres (the static autograder passes but never runs dbt, so it missed these).1. Misleading WARN-severity comment (
tests/assert_avg_tip_pct_within_bounds.sql)The stub told students the test is "intentionally set to WARN severity in dbt_project.yml." But the template ships no
dbt_project.yml(studentsdbt inittheir own), and a project-level severity would silently downgrade theirnot_null/unique_combinationprimary-key tests to warnings too. Now points at an inline{{ config(severity='warn') }}.2. Missing INNER JOIN hint (
models/marts/fct_daily_borough_stats.sql)A handful of trips have a
pickup_location_idwith no matching zone (e.g.999, 5 trips). Under aLEFT JOINthose becomeNULLborough and fail thenot_nullPK test, and the mart lands at 186 rows instead of the rubric's 184. The stub now tells students to use anINNER JOIN.Verification
A correct solution built on this template now runs
dbt build= PASS=12 WARN=1 ERROR=0, mart = 184 rows, singular test = WARN 3 (Unknown bucket) — matchingweek_10__assignment_rubric.mdexactly.Not included
No
dbt buildCI added here: the scaffold is intentionally stubs-only and cannot build. The real regression guard is building the answer key in CI (asnyc-taxi-dbt-referencealready does) — flagged separately.🤖 Generated with Claude Code