Skip to content

Mohamad Bader AA - #12

Open
noneeeed wants to merge 1 commit into
HackYourAssignment:mainfrom
noneeeed:main
Open

Mohamad Bader AA#12
noneeeed wants to merge 1 commit into
HackYourAssignment:mainfrom
noneeeed:main

Conversation

@noneeeed

Copy link
Copy Markdown

No description provided.

@github-actions

Copy link
Copy Markdown

📝 HackYourFuture auto grade

Assignment Score: 100 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 60
🧪 The auto grade is experimental and still being improved

Test Details

=== Week 10 Autograder ===
  ✓ PASS  found dbt_project.yml
  ✓ PASS  found packages.yml
  ✓ PASS  found profiles.yml.example
  ✓ PASS  found macros/safe_divide.sql
  ✓ PASS  found models/staging/_sources.yml
  ✓ PASS  found models/staging/stg_trips.sql
  ✓ PASS  found models/staging/stg_zones.sql
  ✓ PASS  found models/marts/fct_daily_borough_stats.sql
  ✓ PASS  found reports/answers.md
  ✓ PASS  found AI_ASSIST.md
  ✓ PASS  found singular test in tests/
  ✓ PASS  found docs/lineage.png
  ✓ PASS  Level 1: required files (10/10 pts)
  ✓ PASS  .gitignore: profiles.yml excluded
  ✓ PASS  profiles.yml.example: uses env_var() -- no hardcoded password
  ✓ PASS  profiles.yml not committed (correctly git-ignored)
  ✓ PASS  Level 2: secrets hygiene (15/15 pts)
  ✓ PASS  stg_trips.sql: uses {{ source() }} reference
  ✓ PASS  stg_trips.sql: filters NULL pickup_location_id
  ✓ PASS  stg_trips.sql: filters negative fares (fare_amount >= 0)
  ✓ PASS  stg_trips.sql: tip_pct column present
  ✓ PASS  stg_zones.sql: uses {{ source() }} and is filled
  ✓ PASS  Level 3: staging models (20/20 pts)
  ✓ PASS  fct_daily_borough_stats.sql: file filled
  ✓ PASS  mart: ref() to both stg_trips and stg_zones
  ✓ PASS  mart: JOIN to zones present
  ✓ PASS  mart: GROUP BY present
  ✓ PASS  mart: all 6 required output columns present
  ✓ PASS  Level 4: mart model (20/20 pts)
  ✓ PASS  mart YAML: dbt_utils.unique_combination_of_columns test present
  ✓ PASS  staging YAML: not_null tests present
  ✓ PASS  singular test: filled and references fct_daily_borough_stats
  ✓ PASS  Level 5: tests (15/15 pts)
  ✓ PASS  mart YAML: grain stated in model description
  ✓ PASS  mart YAML: 7 column descriptions filled
  ✓ PASS  Level 6: documentation (10/10 pts)
  ✓ PASS  reports/answers.md: 4 SQL blocks present and filled
  ✓ PASS  AI_ASSIST.md: filled (2814 chars)
  ✓ PASS  Level 7: business answers + AI log (10/10 pts)

Score: 100 / 100  (passing: 60)  pass=true

Comment thread macros/safe_divide.sql
-- Return only the SQL expression (no SELECT, no semicolon).
NULL
{% endmacro %}
case

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not wrong but you can also use NULLIF as per instruction for a cleaner expression

(built from ___ and ___), and at least one known caveat
(e.g. rows dropped in staging, any WARN-severity tests).
description: "One row per completed NYC green taxi trip in January 2024, with
pickup/dropoff zone attributes folded in (OBT-style mart). Queried

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does 'OBT-style mart' mean?

COUNT(*) AS trip_count,
SUM(t.fare_amount)::numeric(10,2) AS total_fare,
AVG(t.tip_pct)::numeric(10,2) AS avg_tip_pct,
AVG(t.trip_distance)::numeric(10,2) AS avg_trip_distance

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't necessarily need to add typecasting to each row (it's not wrong, but likely unnecessary)

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.

2 participants