Interview practice question
Aggregates differ between two runs
Data Engineering · Spark · Intermediate
Running the same Spark job twice on the same data gives slightly different totals. What could cause this?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Non-deterministic dedup like dropDuplicates or row_number without tie-breakers.
- Floating point sums in different order give tiny differences.
- Source data changing between runs.
- Use of current timestamp or random functions.
- Fix by deterministic ordering and decimal types.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.