Skip to content

Delta Lake-based Cubic ODS fact table generation job#203

Merged
ealexa05 merged 11 commits into
mainfrom
delta_ods_silver_part1
Jul 2, 2026
Merged

Delta Lake-based Cubic ODS fact table generation job#203
ealexa05 merged 11 commits into
mainfrom
delta_ods_silver_part1

Conversation

@MaxAlex

@MaxAlex MaxAlex commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This adds a new OdinJob instance, CubicODSDelta, which sits parallel to the current CubicODSFact, reading the same history table and snapshot paths and writing fact tables (in delta lake’s parquet format) to a new fact table path: s3://mbta-ctd-dataplatform-dev-springboard/odin/data/cubic/ods_delta . This new path is given a new schema definition in duck_db.py, which is structured read the delta format via delta_scan, and so becomes a new schema cubic_delta available in the data repository.

Importantly, this new job makes no use of the parquet handling utility code in odin/src/utils/parquet.py. Fact table output is written entirely via the Python Delta Lake API; history table input is read via Python’s duckdb API. This is expected to make the job more reliable and faster than the existing CubicODSFact.

@ealexa05 ealexa05 self-requested a review July 1, 2026 19:07

@ealexa05 ealexa05 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving for testing in dev over the weekend, still want to think through this carefully. Exciting stuff!

Comment thread src/odin/generate/cubic/delta_ods.py
@ealexa05 ealexa05 merged commit 1b4a17b into main Jul 2, 2026
5 checks passed
@ealexa05 ealexa05 deleted the delta_ods_silver_part1 branch July 2, 2026 18:57
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