Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dim_purchaseable model #1385

Open
rachellougee opened this issue Nov 18, 2024 · 3 comments
Open

Create dim_purchaseable model #1385

rachellougee opened this issue Nov 18, 2024 · 3 comments
Assignees
Labels
product:data-platform Issues related to the Data Platform product

Comments

@rachellougee
Copy link
Contributor

rachellougee commented Nov 18, 2024

Description/Context

As part of #1325, we need a dimensional table to Include information about elements of content and
services that can be sold for >=$0 (e.g. programs, course runs, bootcamps,
subscriptions, etc.)

Plan/Design

Create a dim_purchaseable/product model including the following fields:

id - hashed primary key
readable_id
name
type (e.g. program, course run)
price
more attributes?

The data sources will include MITx Online, xPro, edxorg, bootcamps, and residential

@rachellougee rachellougee added the product:data-platform Issues related to the Data Platform product label Nov 18, 2024
@rachellougee
Copy link
Contributor Author

rachellougee commented Nov 18, 2024

@blarghmatey Kate and I discussed product_price in this table. @KatelynGit thinks the price should go to tfact_purchase since it's numeric and measurable. I think it should go to dim_purchaseable/product table (Slowly Changing Dimension if needed) since it is an attribute of a product, especially since the price is the same across users' transactions. That way we would avoid redundancy and can easily query the products with no purchase history. If price changes I just wanted us to be on the same page. What do you think?

@blarghmatey
Copy link
Member

I think that it should go in both places, treating the dim_purchaseable as a type 2 SCD, since price isn't static.

@rachellougee
Copy link
Contributor Author

rachellougee commented Nov 19, 2024

I think that it should go in both places, treating the dim_purchaseable as a type 2 SCD, since price isn't static.

That makes sense. We can create dim_purchaseable as Slowly Changing Dimension Type 2 to keep the changes. Currently, the table is loaded as a full refresh in airbyte. Do we need to modify the staging table or implement the new model to capture the changes in dbt instead? The price isn't changed that often as far as I can tell though

@rachellougee rachellougee self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:data-platform Issues related to the Data Platform product
Projects
None yet
Development

No branches or pull requests

2 participants