MLA-C01 practice question 6 of 10

An ML engineer needs to use data with Amazon SageMaker Canvas to train an ML model. The data is stored in Amazon S3 and is complex in structure. The ML engineer must use a file format that minimizes processing time for the data. Which file format will meet these requirements?

Full set: 259 questions
Answer options
A: CSV files compressed with Snappy
B: JSON objects in JSONL format
C: JSON files compressed with gzip
D: Apache Parquet files Correct answer
Correct Answer:
D. Apache Parquet files
Explanation

Apache Parquet is a columnar storage file format optimized for performance in large-scale data processing. For complex data structures, Parquet's columnar layout significantly minimizes processing time by allowing Amazon SageMaker to read only the specific columns needed for analysis, rather than scanning entire rows. This drastically reduces I/O operations and accelerates data retrieval. Its support for efficient, splittable compression further enhances performance in distributed environments like those used by AWS services.

Why Incorrect

A. CSV files compressed with Snappy: CSV is a row-based format and is inefficient for querying specific columns from complex data, which increases I/O and processing time despite the fast Snappy compression.
B. JSON objects in JSONL format: JSONL is also row-based. While it handles complex structures, processing requires reading and parsing entire JSON objects, making it slower than Parquet's selective column reads.
C. JSON files compressed with gzip: A single, large gzip-compressed file is not splittable. This prevents parallel processing, creating a bottleneck and significantly increasing processing time for large datasets.

References

1. AWS Big Data Blog: In a post on performance tuning

AWS states

"We recommend you use Apache Parquet or Apache ORC... Parquet is a columnar data format that is optimized for fast retrieval of data." This directly supports using Parquet to minimize processing time.

Source: AWS Big Data Blog

"Top 10 performance tuning tips for Amazon Athena

" Tip #2. (URL: https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/)

2. Apache Parquet Official Documentation: The official documentation describes Parquet as "a columnar storage format... designed for efficient as well as performant flat columnar storage format of data compared to row based files like CSV or TSV files."

Source: The Apache Software Foundation

"Apache Parquet Documentation." (URL: https://parquet.apache.org/docs/)

3. Amazon SageMaker Developer Guide: The guide explains that for efficient data processing

especially with services like AWS Glue

converting data to Apache Parquet is a best practice. This reduces the amount of data scanned and improves performance.

Source: Amazon SageMaker Developer Guide

"Input and Output Data." (URL: https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-training.html - Note: While this link discusses data formats for training

the principle of Parquet's performance advantage is a core concept across AWS analytics and ML services).

Scroll to Top