Skip to content

fix(week10): correct WARN-severity guidance + add INNER JOIN hint#3

Merged
lassebenni merged 1 commit into
mainfrom
fix/week10-live-build-guidance
Jul 2, 2026
Merged

fix(week10): correct WARN-severity guidance + add INNER JOIN hint#3
lassebenni merged 1 commit into
mainfrom
fix/week10-live-build-guidance

Conversation

@lassebenni

Copy link
Copy Markdown
Collaborator

What

Two small, student-facing scaffold fixes surfaced by building the Week 10 assignment end-to-end against the live nyc_taxi tables 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 (students dbt init their own), and a project-level severity would silently downgrade their not_null / unique_combination primary-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_id with no matching zone (e.g. 999, 5 trips). Under a LEFT JOIN those become NULL borough and fail the not_null PK test, and the mart lands at 186 rows instead of the rubric's 184. The stub now tells students to use an INNER 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) — matching week_10__assignment_rubric.md exactly.

Not included

No dbt build CI added here: the scaffold is intentionally stubs-only and cannot build. The real regression guard is building the answer key in CI (as nyc-taxi-dbt-reference already does) — flagged separately.

🤖 Generated with Claude Code

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
@lassebenni lassebenni merged commit 47dab80 into main Jul 2, 2026
1 check passed
@lassebenni lassebenni deleted the fix/week10-live-build-guidance branch July 2, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant