Chinh (lelouvincx) / 2026-02-26

Created Thu, 26 Feb 2026 00:00:00 +0000 Modified Mon, 25 May 2026 06:02:25 +0000
219 Words

Notes

  • Tasks

  • Done

    • TODO Fix the temp bridge table

    • Approach: Treat atc_price_history as alternative to retailer_current_pricing.

    • Current state: using a table bridge_product_retailer as a mapping between atc_price_history and retailer_current_pricing. The result is when querying historical prices, Redshift has to join a long path from master_product -> retailer_current_pricing -> bridge_product_retailer -> atc_price_history just to query the historical price, while expect to join master_product to atc_price_history => leads to slow performance.

    • The only difference between those 2 is that atc_price_history contains historical price, while retailer_current_pricing contains present price. But similarly they are fact tables telling the price of a product inside a retailer.

    • Take retailer_current_pricing as standard fact, it has relationships with 2 tables:

      • master_product via product_id
      • retailer via retailer_id
    • Meanwhile, atc_price_history has incomplete keys to make relationships with master product and retailer.

      • What I mean “incomplete” is that atc_price_history has columns:
        • retailer but it’s retailer slug
        • productcode but it’s product’s code in context of a retailer, not the official product id (uuid)
    • 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)