mitodl / mitodl/ol-data-platform
Create dimensional models for MITx Pro coupon/B2B ecommerce layer
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 51
- Forks
- 6
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 113
Description
What are the relevant tickets?
Part of epic #2072
Description
Two mart models cannot be migrated to the dimensional layer because the required dimensional abstractions do not yet exist:
marts__mitxpro_all_coupons(#2099) — references 12 MITxPro-specific ecommerce int__ models including B2B orders, coupons, coupon payment versions, coupon products, and company data. No dimensional equivalent exists.marts__combined_discounts(#2081) — partially depends onmarts__mitxpro_all_couponsand MITxOnline discount int__ models. Blocked by the coupon mart.
Scope
Investigate and create the dimensional models needed to support these marts. Candidates include:
dim_coupon— coupon definitions, types, discount amounts across MITxOnline and MITxProdim_b2b_contract(or extenddim_contract) — B2B company/contract-level order groupingtfact_coupon_redemption— coupon application events tied to orders
Source intermediates to consolidate:
int__mitxpro__ecommerce_allcoupons,int__mitxpro__ecommerce_coupon,int__mitxpro__ecommerce_couponpaymentversion,int__mitxpro__ecommerce_couponproductint__mitxpro__b2becommerce_b2border,int__mitxpro__b2becommerce_b2breceipt,int__mitxpro__ecommerce_companyint__mitxonline__ecommerce_discount,int__mitxonline__ecommerce_discountproduct
Definition of Done
- New dimensional coupon/B2B models exist in
models/dimensional/ - Models pass dbt tests
- Unblocks migration of #2081 (
marts__combined_discounts) and #2099 (marts__mitxpro_all_coupons)
Additional Context
dim_discount and dim_discount_type already exist for MITxOnline discounts. The gap is specifically the MITxPro coupon/B2B layer which has no dimensional equivalent. Review existing dim_discount.sql and dim_contract.sql before designing new models.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing models/dimensional/dim_discount.sql and dim_contract.sql, then trace the listed MITxPro and MITxOnline intermediate models. Determine the dimensional coupon and B2B abstractions needed by #2081 and #2099. Run the dbt tests for the new models; done means the models exist in models/dimensional/ and unblock both mart migrations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100