Notes
Tasks
Done
TODO Fix the temp bridge table
Approach: Treat
atc_price_historyas alternative toretailer_current_pricing.Current state: using a table
bridge_product_retaileras a mapping betweenatc_price_historyandretailer_current_pricing. The result is when querying historical prices, Redshift has to join a long path frommaster_product -> retailer_current_pricing -> bridge_product_retailer -> atc_price_historyjust to query the historical price, while expect to joinmaster_producttoatc_price_history=> leads to slow performance.The only difference between those 2 is that
atc_price_historycontains historical price, whileretailer_current_pricingcontains present price. But similarly they are fact tables telling the price of a product inside a retailer.Take
retailer_current_pricingas standard fact, it has relationships with 2 tables:master_productviaproduct_idretailerviaretailer_id
Meanwhile,
atc_price_historyhas incomplete keys to make relationships with master product and retailer.- What I mean “incomplete” is that
atc_price_historyhas columns:retailerbut it’s retailer slugproductcodebut it’s product’s code in context of a retailer, not the official product id (uuid)
- What I mean “incomplete” is that
Goal: get rid of the
bridge_product_retailer, which was a workaround we made previously.
{{embed ((698af7cb-766b-4fc7-a60b-1047af1f88b0))}}
DONE Set up skill for notion cli
DONE Catch up with Simon
DONE Fix small issue in dashboard 3 (Promotional Planning) when it does not filter out products not belong to the primary retailer (today’s products = 18 while historical products = 17)