Courseiva
Data Preparation for Machine LearningeasyMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A company has a dataset of 2 billion records stored as text files in Amazon S3. The data is partitioned by year and month. The data science team wants to read only the last 6 months of data for model training using SageMaker. To minimize data scanned and reduce costs, which approach should the team use?

⚠ Common exam trap

AWS often tests the misconception that SageMaker's Input Mode 'File' or S3 Select can efficiently filter partitioned data, but the key trap is that partition pruning requires a catalog service (like Glue) and a query engine (like Athena) to avoid scanning all objects or listing the entire bucket.

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 create a catalog table with partitions, then query with Athena to create a filtered dataset in S3.

AWS Glue can crawl the S3 data to create a catalog table with partitions by year and month. Athena can then query only the partitions corresponding to the last 6 months, scanning minimal data and writing the filtered results back to S3 for SageMaker training. This approach leverages partition pruning to reduce costs and avoids loading or processing the full 2 billion records.

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 S3 Select to retrieve only the last 6 months of data by applying an SQL expression on each object.

    Why it's wrong here

    S3 Select works per object and does not support partition filtering across directories.

  • Use AWS Glue to create a catalog table with partitions, then query with Athena to create a filtered dataset in S3.

    Why this is correct

    Partition pruning ensures only relevant data is scanned.

  • Use SageMaker Processing with a script that lists all objects in the bucket and reads only those with the desired prefixes.

    Why it's wrong here

    This still lists all objects and may incur listing costs.

  • Use SageMaker Processing with Input Mode 'File' and specify the S3 prefix for the last 6 months.

    Why it's wrong here

    This still downloads all listed files; without partition pruning, it scans all files.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every MLA-C01 question from scratch — 835 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLA-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 MLA-C01 exam.