Handling Daily Sales & Refund Updates

🔹 User Story 1 – Handling Daily Sales & Refund Updates

📌 Problem:
Orders are coming in real-time, but sometimes refunds/cancellations happen later. You need to update existing records without breaking analytics queries.

✅ Solution with Delta Lake

  • Delta Lake allows ACID transactions, so you can safely update order records.

  • Supports time travel: you can query yesterday’s snapshot of sales vs today’s.

  • Example:

    • An order placed at 2 PM yesterday → appears in analytics.

    • Customer cancels at 10 AM today → Delta Lake can update that row and ensure queries reflect the correct refund.

👉 This ensures accurate revenue reporting.