mitodl / ol-data-platform

Pipeline definitions for managing data flows to power analytics at MIT Open Learning
BSD 3-Clause "New" or "Revised" License
36 stars 6 forks source link

fixes to int__mitxpro__ecommerce_allorders and marts__combined__orders tables and new columns #1189

Closed KatelynGit closed 1 month ago

KatelynGit commented 2 months ago

What are the relevant tickets?

https://github.com/mitodl/hq/issues/4296

Description (What does it do?)

Removes a join to commerce coupon that was causing issues with duplicating b2b data. That table wasn't needed for regular orders anyway and coupon data for those orders can be gotten via the other tables. B2B data should be pulled from b2b tables. This will help with duplicated data downstream as well.

This also makes changes to martscombinedorders. It adds the b2b order id as a seperate field, adds a single primary key to the table(which we can eventually add to other mart tables for easier joining), removes the b2b only indicator since the id can be used for that and I didn't want too many columns only populated by one source.

How can this be tested?

dbt build --select intmitxproecommerce_allorders dbt build --select martscombinedorders