feat(lakehouse): runtime data-trust signals on the dimensional layer (P3)#2436
Open
blarghmatey wants to merge 2 commits into
Open
feat(lakehouse): runtime data-trust signals on the dimensional layer (P3)#2436blarghmatey wants to merge 2 commits into
blarghmatey wants to merge 2 commits into
Conversation
🔎 ol-dbt impact — column-level blast radius✅ No column-level downstream impact detected for the changed models. Posted by |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds runtime data-trust signals for the lakehouse dbt dimensional layer so Dagster can surface operational “is this data still healthy?” indicators that dbt tests alone don’t cover. This complements the existing dbt-test-to-asset-check hoisting by dagster-dbt and the recent CI hardening work.
Changes:
- Attach a FreshnessPolicy (warn 30h / fail 48h) to dimensional dbt assets via
map_asset_specs. - Add column schema change asset checks for dimensional assets via
build_column_schema_change_checks. - Add a scheduled dbt source freshness job (STOPPED by default) that uploads
sources.jsonto S3 for OpenMetadata, and expand MIT Learn source freshness config.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ol_dbt/models/staging/mitlearn/_mitlearn__sources.yml | Adds freshness configuration + loaded_at_field canary for the MIT Learn users source table. |
| dg_projects/lakehouse/lakehouse/assets/lakehouse/dbt.py | Implements dimensional-layer freshness policy mapping, schema-change checks, and a dbt source freshness job that uploads sources.json. |
| dg_projects/lakehouse/lakehouse/definitions.py | Wires the new job/schedule into lakehouse Definitions and registers the dimensional schema-change checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dagster-dbt already hoists dbt tests (incl. the dbt_expectations suite) into asset checks, but nothing expresses two runtime signals the dimensional contract boundary needs: has each table actually rebuilt, and did its column schema drift between builds. - Attach a FreshnessPolicy (warn 30h / fail 48h) to the 47 dimensional dbt assets via map_asset_specs; evaluated automatically by the daemon, no sensor required. - Register column-schema-change checks on the same assets; they ride along with each build and compare against the previously recorded TableSchema (viable because full_dbt_project already captures column metadata via fetch_column_metadata()). - Add a scheduled `dbt source freshness` job that publishes sources.json to S3 for OpenMetadata — source freshness was configured but never run. - Expand source freshness from 2 to 3 active platforms (add a MIT Learn users_user canary on the native-timestamp updated_on field). The new schedule ships STOPPED, matching the repo convention of enabling in production after a first verified run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
blarghmatey
force-pushed
the
worktree-dbt-runtime-trust-checks
branch
from
July 16, 2026 14:06
8b3b9f8 to
c698b1c
Compare
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 & why
Part of the dbt warehouse CI/QA hardening & data-trust effort (#2407). PR-time CI now runs (
ol-dbt diff/validate, dimensional-layering lint, expanded pytest — #2425/#2428/#2430); this adds the runtime trust signals.dagster-dbtalready hoists every dbt test (including the heavydbt_expectationssuite) into Dagster asset checks automatically, so those are not reimplemented. This PR adds the signals dbt tests cannot express, focused on the declared contract boundary — the dimensional layer (models/dimensional).Changes
FreshnessPolicy(warn 30h / fail 48h) is attached viamap_asset_specs. Evaluated automatically by the Dagster daemon — no sensor required (the modern replacement for the supersededbuild_last_update_freshness_checks+ sensor).TableSchema— viable for free becausefull_dbt_projectalready captures column metadata via.fetch_column_metadata().dbt source freshnessjob publishingsources.jsonto S3 for OpenMetadata. Source freshness was configured but never actually run anywhere. ShipsSTOPPEDper the repo convention (enable after a first verified run).users_usercanary on the native-timestampupdated_onfield. (Intentionally not bootcamps/micromasters — those are dead/retiring and would only generate false alarms.)Verification
dagster definitions validate -m lakehouse.definitions→ passes; 47/47 dimensional specs carry the freshness policy, all 655 keys intact, 47 schema-change check specs registered.dbt parsecompiles the new freshness config into the manifest (mitxonline, mitxpro, mitlearn).pre-commit(ruff format + check, mypy, yamllint, detect-secrets) → green.Follow-ups (need warehouse credentials to validate
loaded_at_fieldper source): extend source freshness to more active platforms (mitxresidential, mitpe); pushrun_results.jsoninto OpenMetadata as DBT test cases; enrichol-dbt impactwith OM downstream lineage.🤖 Generated with Claude Code