P49PandasIntermediateDiagnose14 min
Diagnose a Join Explosion After Merging Orders and Pageviews
Find why a merge multiplied rows before conversion was calculated.
#diagnose#merge#join-grain
Scenario
Orders has one row per order and pageviews has many rows per session. Both are merged on customer_id, and revenue jumps from 20,000 to 94,000.
Problem statement
Identify the grain problem and design a safe recomputation.
Your Task
- Explain why rows multiply.
- State the intended grain.
- Choose an aggregation before merging.
Related Concepts
Merge validationCardinalityConversion
Ready to count this problem?
Mark it complete when you have reasoned through the solution in your own words.