Data Operations and Support

An AWS Glue Spark aggregation must calculate exact average amounts per merchant without dropping records; one merchant owns 70% of the rows. Which changes work together to distribute that merchant's processing and preserve correctness? (Choose two.)

Choose 2 answers

Show the answer

Correct answersA. Calculate partial sums and counts, then combine them per merchant.E. Assign each row a salt bucket and group by merchant and bucket.

AWhy this is right: Summing partial sums and counts, then dividing, preserves the exact average across unequal bucket sizes.

BWhy not this: Hash partitioning only by merchant still places all rows for the dominant merchant in one group.

CWhy not this: An unweighted average of bucket averages is not generally correct when bucket counts differ.

DWhy not this: Sampling discards records and produces an estimate rather than the required exact result.

EWhy this is right: Adding a varying salt spreads the dominant merchant's rows across multiple aggregation groups.

FWhy not this: Repeated merchant IDs represent legitimate transactions; removing them changes the required result.

Salting spreads a hot merchant across partial aggregation groups. Combining partial sums and counts yields the exact average; averaging bucket averages can be wrong because bucket sizes can differ.