‹ All MLA-C01 questions

MLA-C01 Practice Question 21: Columnar Format Athena Cost

AWS Certified Machine Learning Engineer – Associate (MLA-C01) · Test 3 · question 1 of 10

Data Preparationmedium

Raw clickstream events land in Amazon S3 as gzip-free CSV files with 120 columns, registered as a table in the AWS Glue Data Catalog. Data scientists build training datasets by running Amazon Athena queries that select roughly 8 of those columns and filter on an event date. Every query scans the whole dataset, and the Athena bill has become the largest line item in the project. The team wants to cut the bytes each query scans without changing the queries themselves.

Select one answer
Show answer and explanation

Answer:

  • C. Convert the CSV files to Apache Parquet with an AWS Glue ETL job and repoint the catalog table at it

Parquet is a columnar format. Because each column is stored and compressed separately, Athena reads only the 8 columns a query actually selects instead of all 120, and predicate pushdown lets it skip whole blocks whose min/max statistics rule out the date filter. Athena bills by bytes scanned, so column pruning plus block skipping is the direct fix, and it is invisible to the SQL; the table name and column names stay the same (option C).

- A is wrong because it replaces the problem with a migration: a Redshift cluster is new infrastructure to size and pay for, and the queries would have to be repointed at it. - B is wrong because gzip CSV is still row-oriented, so every query still reads all 120 columns of every matching row. Worse, gzip files are not splittable, so Athena loses read parallelism. - D is wrong because the number of objects does not change how many bytes hold the 8 needed columns. Athena still scans every row, and very small objects add per-file request overhead.

Reference: Use columnar storage formats

Practice Test 3 ›

Study guides for MLA-C01