Parquet Conversion for Athena: Cost and Performance Optimization
A company is building a data lake on Amazon S3. Data arrives from multiple sources in different formats (CSV, JSON, Parquet). The engineering team wants to query this data using Amazon Athena with minimal transformation. Which approach minimizes query cost and improves performance?
Quick Answer
Amazon Athena bills by the amount of data scanned per query, so the two changes here, converting to Parquet and partitioning by date, both work by shrinking how much data any given query actually has to read. Parquet is a columnar format, which means a query that only needs a handful of columns can skip reading the other columns entirely, unlike row-based formats like CSV or JSON where the engine has to read every field of every row even if most of them aren't needed. Partitioning by date adds a second, complementary layer of pruning: when a query includes a date filter, Athena can skip entire partitions that fall outside the requested range instead of scanning the whole dataset, which further reduces bytes scanned and therefore both cost and query time. AWS Glue is the natural tool to perform this conversion because it's a serverless ETL service that can read the mixed CSV, JSON, and Parquet sources, transform them into a consistent columnar, partitioned layout, and do so without the team managing any servers. Writing the converted output to a separate S3 bucket keeps the raw, original-format data intact and untouched, which is good practice for preserving source fidelity while still optimizing the layer that's actually queried. Whenever a scenario centers on minimizing Athena query cost and improving performance over mixed-format S3 data, expect the answer to combine a columnar format conversion with partitioning, since both act directly on the metric Athena charges for: data scanned.
⚠ Common exam trap
It's easy for candidates to choose Option D (store as-is) thinking Athena can handle any format efficiently, but they overlook that Athena’s pricing is based on data scanned, and raw CSV/JSON scans are far more expensive than columnar formats like Parquet.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use AWS Glue to convert all data to Parquet format, partition by date, and store in a separate S3 bucket
Converting data to Parquet format (a columnar storage format) significantly reduces the amount of data scanned by Athena, which directly lowers query cost (Athena charges per TB scanned). Partitioning by date further limits scanned data by pruning irrelevant partitions. AWS Glue provides a serverless ETL service to perform this conversion efficiently, and storing the output in a separate S3 bucket avoids polluting the raw data lake.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Amazon Redshift Spectrum to query the data directly without transformation
Why it's wrong here
Redshift Spectrum can query S3 data, but still benefits from optimized formats; also adds Redshift cost.
- ✓
Use AWS Glue to convert all data to Parquet format, partition by date, and store in a separate S3 bucket
Why this is correct
This reduces data scanned, improves performance, and lowers cost.
- ✗
Use Amazon EMR to convert data to CSV format and repartition
Why it's wrong here
CSV is not optimal; Parquet is better. EMR adds complexity and cost.
- ✗
Store data as-is in S3 and create external tables in Athena for each format
Why it's wrong here
While possible, querying raw CSV/JSON scans more data and is less performant than optimized formats.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on MLS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company wants to analyze historical data stored in Amazon S3 using Amazon Athena. The data is in CSV format and is partitioned by date. Which action will provide the best query performance and cost optimization?
easy- A.Use AWS Glue to compress the CSV files with gzip
- B.Create an S3 event notification to trigger a Lambda function that warms up Athena
- C.Keep CSV format but ensure partitions are in the format year=YYYY/month=MM/day=DD
- ✓ D.Convert the data to Parquet format and use the existing partition structure
Why D: Converting data to Parquet and partitioning provides the best performance and cost savings because Athena can use predicate pushdown and column pruning, scanning less data. Option A (using Glue to gzip compress) still uses CSV which requires full scan. Option B (S3 event notification to warm up Athena) is not relevant because Athena caches results but doesn't need warming. Option C (only partitioning) helps but CSV is still row-based and less efficient than Parquet.
Variation 2. A company is using Amazon Athena to query a data lake in S3. Queries are slow and expensive. The data is stored as JSON. Which action will improve query performance and reduce cost?
medium- A.Compress the JSON files using gzip
- B.Partition the data by date
- ✓ C.Convert the data to Parquet format
- D.Increase the number of Athena workers
Why C: Converting JSON data to Parquet format significantly improves Athena query performance and reduces cost. Parquet is a columnar storage format that allows Athena to scan only the columns needed for a query, drastically reducing the amount of data read from S3. This minimizes I/O and compute costs, as Athena charges based on the amount of data scanned. In contrast, JSON is row-based and requires scanning entire files even for queries that only touch a few columns.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.