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.
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