Implement data-assignment for ecommerce pipeline - #5
Open
shramore58-byte wants to merge 4 commits into
Open
Conversation
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.
Summary
Implemented a minimal CDC pipeline capturing changes from a MySQL E-commerce source database. The pipeline ingests outbox events into a Parquet data lake and models the current state in a DuckDB warehouse, including schema contract gating, data quality checks, catalog generation, and point-in-time lake restore capabilities.
Source Schema Design
customer_idon orders,order_idon order_items). Includes indexes on frequent lookup keys.schema.sql.CDC Strategy
cdc_eventstable).op_type(I, U, D) and a JSON payload in the outbox. Processed into append-only Parquet events in the lake.state/checkpoint.jsonallowing resumption from the last successfully processed event.ON CONFLICT DO UPDATE) ensure idempotency on the warehouse side.Lake and Warehouse Modeling
source_tableanddt(date).scripts/restore_warehouse.py.Schema Change Safety
scripts/check_schema_contracts.pycompares live MySQLINFORMATION_SCHEMAagainst a predefinedschema_contract_spec.jsonand a compiled hash (schema_fingerprint.json).ingest/FAILED_SCHEMA_CHANGE.md.Validation Parity
scripts/run_data_quality_checks.pyruns against DuckDB to assert these rules on the modeled warehouse data.Catalog Exposure
catalog/catalog.jsonmaintains metadata, ownership, and dataset locations for both raw lake partitions and warehouse snapshot tables. Verified usingscripts/validate_catalog.py.Validation
Commands and workflows ran to validate the solution:
Known Limitations / Next Steps
Responsible AI Usage
Author Checklist