|
| 1 | +## What I built |
| 2 | +- Staging models: `stg_trips.sql`, `stg_zones.sql` (+ their `_*.yml` tests/descriptions) |
| 3 | +- Mart: `fct_daily_borough_stats.sql` at grain one row per (pickup_borough, pickup_date) |
| 4 | +- Macro: `safe_divide.sql` |
| 5 | +- Singular test: `assert_avg_tip_pct_within_bounds.sql` |
| 6 | +- `dbt_utils` declared in `packages.yml` |
| 7 | +- Lineage screenshot: `docs/lineage.png` |
| 8 | +- Business answers: `reports/answers.md` |
| 9 | +- AI usage: `AI_ASSIST.md` |
| 10 | + |
| 11 | +## How to review |
| 12 | +- Models: read `models/marts/fct_daily_borough_stats.sql` (grain + measures) and the staging models. |
| 13 | +- Lineage: `docs/lineage.png`. |
| 14 | +- Answers: `reports/answers.md`. |
| 15 | +- AI usage: `AI_ASSIST.md`. |
| 16 | + |
| 17 | +## How to run |
| 18 | +From a clean clone, with your own Postgres access: |
| 19 | + |
| 20 | +```bash |
| 21 | +cp profiles.yml.example profiles.yml # set schema to dev_<your_name> |
| 22 | +cp .env.example .env # fill PG_HOST, PG_USER, PG_PASSWORD |
| 23 | +source .env |
| 24 | +dbt deps |
| 25 | +dbt build # runs models + tests |
| 26 | +``` |
| 27 | + |
| 28 | +`dbt debug` must end with `All checks passed!` first. |
| 29 | + |
| 30 | +> Data dependency: this builds into **your own** `dev_<name>` schema on the shared Postgres. A reviewer without that access relies on `docs/lineage.png` and `reports/answers.md` as the canonical evidence. |
| 31 | +
|
| 32 | +## What reviewers should see (expected results) |
| 33 | +Fill in what your build actually produces: |
| 34 | +- `dbt build` result: <e.g. PASS=NN WARN=1 ERROR=0> |
| 35 | +- `fct_daily_borough_stats` row count: <e.g. ~180> |
| 36 | +- Grain: one row per (pickup_borough, pickup_date) |
| 37 | +- One business answer sample: <e.g. Manhattan has the most trips> |
| 38 | + |
| 39 | +## Known limitations / out of scope |
| 40 | +- <e.g. the singular test WARNs rather than errors by design; incremental not implemented> |
| 41 | +- Write "none" if everything in the assignment is done and working. |
| 42 | + |
| 43 | +## Self-check |
| 44 | +- [ ] `bash .hyf/test.sh` passes |
| 45 | +- [ ] `dbt build` completes with no ERROR |
| 46 | +- [ ] `fct_daily_borough_stats` exists as a **table** at the stated grain |
| 47 | +- [ ] No credentials committed (`profiles.yml` / `.env` are gitignored) |
| 48 | +- [ ] `docs/lineage.png` is committed |
0 commit comments