Revenue Inflated After a Customer Feed Load

PySpark · data quality · Intermediate · about 20 minutes

Impact

The revenue dashboard over-reports sales for some customers after last night's customer-feed load, while order volume has not changed.

Symptoms

Evidence

Row counts, last run

datasetrows
df_orders (input)3
df_customers (lookup feed)3
orders joined to customers (output)5

Revenue check, customer 1

sourcerevenue
Sum of df_orders.amount340
Revenue dashboard680

df_customers, as delivered by the feed

customer_idname
1Alice
1Alice_dup
2Bob

Job log

[etl] load_customers        rows_written=3  status=OK
[etl] join_orders_customers rows_in=3  rows_out=5  status=OK
[etl] publish_revenue       status=SUCCESS

Investigation task

Rebuild the orders-to-customers join so every order appears exactly once with one customer name. Build a DataFrame called df_result and finish with df_result.show().

The fix is written and graded in the regular challenge editor. The postmortem unlocks once the incident is resolved.

All production incidents