Skip to content

Epic: dbt warehouse audit — semantic accuracy & consolidation #2375

Open
13 of 24 issues completed
Open

Description

@blarghmatey

Description/Context

Umbrella tracking issue for the 2026-07 dbt warehouse audit — a thorough review of the ol_dbt project (src/ol_dbt, ~650 models) evaluating the semantic accuracy of the dimensional, mart, and reporting layers against their documented contracts, using OpenMetadata lineage + profiling as ground truth.

The audit produced remediation work across five workstreams:

  1. Dimensional layer correctness defects — identity collapse, unstable surrogate keys, SCD2 null-churn, platform-scoping violations, and systemic defensive-dedup that masks join fan-out.
  2. Marts & reporting metric correctness — inverted-sign metrics, multiple competing definitions of the same concept (is_enrolled, problems-attempted, program-completion days), fan-out user joins feeding live Superset dashboards, and reporting→dimensional migration finishers.
  3. Dead model & catalog cleanup — zero-consumer marts/reporting models, a dead dimensional "island" (unused bridges/dims), and catalog hygiene.
  4. Shared macro extraction & adoption — ~54 near-identical per-platform models (staging clones + user_courseactivity family), macro-adoption sweeps for cross-db portability, and config cleanup.
  5. StarRocks support for cross-database macros — 18 missing starrocks__ macro variants, 3 buggy variants, and live-cluster validation.

Highest-severity findings (P0): dim_user NULL-email identity collapse (#2376), un-deduped user joins fanning out engagement marts (#1957), and the inverted-sign program_completion_days metric (#2083).

Findings are tracked as witan tasks under project wp-dbt-warehouse-audit-semantic-accuracy-consolidat-b4244e; durable structural facts are stored as witan memories. Several workstreams overlap the in-flight mart→dimensional migration already tracked in #2072 (and #531) — pre-existing issues below are cross-linked and carry the new audit findings as comments, but remain under their existing epics.

Plan/Design

Sub-issues are grouped by workstream. The 24 newly-opened issues appear in the native sub-issue tracker above; pre-existing issues are cross-referenced here.

1. Dimensional layer correctness defects

2. Marts & reporting metric correctness

3. Dead model & catalog cleanup

4. Shared macro extraction & adoption

5. StarRocks support for cross-database macros

Activity

  1. 5 remaining items

  2. blarghmatey commented on Aug 20, 2026

    @blarghmatey
    MemberAuthor

    Triage pass 2026-08-20 - checkbox state refreshed against the actual issue states.

    Ticked the 11 children that have since closed: #2376, #2377, #2378, #2380, #2381, #2383, #2387, #1957, #2083, #2396, #2397. Both remaining P0s (#1957, #2083) are among them. Landed via a435636 (#2400), 717d0ff, 74b4791, fd3d097, 67771f5, b066df8, fb61916, f2de6a0, a20a728 (#2497).

    Where the five workstreams actually stand:

    1. Dimensional correctness - 6 of 11 done. Open: Fix dim_discount grain mismatch causing tfact_order discount_fk fan-out #2379, Replace defensive final dedups with pre-deduped lookups in business facts #2382, Include platform in content_block_pk surrogate (dim_course_content and children) #2384, Make remaining tracking-log event facts incremental #2385, Dimensional yml/doc alignment pass (OpenMetadata-verified drift) #2386.
    2. Marts & reporting metric correctness - 3 of 12 done. The reporting-migration finishers (Migrate engagement_problem_completion_summary to use dimensional layer #2104, Migrate organization_administration_report to use dimensional layer #2107, Migrate combined_video_engagements_counts_report to use dimensional layer (blocked by mart migration) #2112, Migrate Enrollment_Activity_Counts_Dataset to use dimensional layer (blocked by mart migration) #2113, Migrate enrollment_detail_report to use dimensional layer (blocked by mart migration) #2114, Migrate marts__combined__users to use dimensional layer #2077) are all gated on the mart layer, which has not moved since 2026-04-06.
    3. Dead model & catalog cleanup - partially actioned today: 8 of the 9 zero-consumer marts named in the [Epic] Migrate mart and reporting models to use the dimensional layer #2072 audit comment were closed as deletions (Migrate marts__combined_total_course_engagements to use dimensional layer #2082, Migrate marts__micromasters_summary to use dimensional layer #2086, Migrate marts__micromasters_course_certificates to use dimensional layer #2087, Migrate marts__micromasters_summary_timeseries to use dimensional layer #2089, Migrate marts__mitxonline_discussions to use dimensional layer #2093, Migrate marts__mitxonline_problem_submissions to use dimensional layer #2094, Migrate marts__mitxonline_problem_summary to use dimensional layer #2095, Migrate marts__mitxpro_ecommerce_productlist to use dimensional layer #2099). Migrate marts__mitxonline_course_certificates to use dimensional layer #2090 is held pending an IR check - it carries grants: select: ['mit_irx'], so dbt lineage cannot see its consumers. Automate cleaning up the removed or renamed models  #531 and Decide fate of dimensional dead island (catalog bridges, dim_topic/department, afact_video_engagement, dim_time/date) #2399 remain open.
    4. Macro extraction & adoption - untouched. Macro-ize per-platform Open edX staging clones (~28 models, drift confirmed) #2390, Macro-ize int__*__user_courseactivity_* family (~26 models differing by one ref) #2391, Macro-ize additional per-platform intermediate families beyond user_courseactivity #2392, Extract tracking-log event-fact macro; stop dim_problem re-scanning raw logs #2393, Macro adoption sweep: replace inline idioms with existing dispatch macros #2394, dbt config cleanup: redundant materializations, dead macro, duplicated value lists #2395 all confirmed still open by re-running each check.
    5. StarRocks - Implement 18 missing starrocks__ macro variants (doc-verified implementations ready) #2396 and Fix 3 buggy starrocks__ macro variants (json_extract_value, from_iso8601_timestamp, array_join) #2397 both landed, which means Validate StarRocks macro set on a live cluster (syntax gaps the docs don't cover) #2398 (live-cluster validation) is now unblocked; its "Blocked by" line is stale.

    Two corrections to the audit's own numbers, from re-verification: #2390 covers 23 staging clones, not ~28; #2391 covers 27 files, not ~26. #2394 has partially regressed - the StarRocks-blocking json_extract item is done (b2eb04d), but 8 new raw json_extract_scalar() calls entered bridge_user_account_link.sql via #2474.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions