A Glue job reads data from S3 in CSV and writes to Parquet with Snappy. You discover a large number of small files, causing poor query performance in Athena. What approach best mitigates small-file problems?

Answer

Coalesce or repartition appropriately before writing, and use Glue job configurations or Spark settings to target a reasonable file size

Explanation

Appropriate repartition/coalesce reduces the number of output files. Targeting file size improves partition/file-level metadata efficiency for Athena.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list