Courseiva

MLA-C01 Data Preparation for Machine Learning Practice Question

A data scientist is using Amazon SageMaker Data Wrangler to prepare a dataset. The dataset contains a column with date strings in the format 'YYYY-MM-DD'. The data scientist wants to extract the year, month, and day as separate features. Which Data Wrangler transform should be used?

⚠ Common exam trap

Many candidates confuse 'Parse date' with 'Encode categorical' because dates can be treated as categorical features, but the question specifically asks for extracting year, month, and day as separate features, which requires parsing the date string into its components, not encoding the entire date as a category.

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

✓

Parse date transform.

The 'Parse date' transform in Amazon SageMaker Data Wrangler is specifically designed to convert date strings into structured datetime components. By applying this transform to the 'YYYY-MM-DD' column, the data scientist can automatically extract year, month, and day as separate features, enabling downstream feature engineering without manual string parsing.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Encode categorical transform.

    Why it's wrong here

    Encode categorical converts string categories into numeric codes for algorithms; it cannot split a date string into year, month and day components. It is tempting because dates are strings, and would be correct for transforming nominal fields such as country or product type into model-readable values.

  • ✗

    Scale values transform.

    Why it's wrong here

    Scale values normalises numeric ranges for algorithms sensitive to magnitude; it cannot decompose a date string into year, month and day fields. It is tempting because feature engineering often includes scaling, and would be correct for continuous numeric columns such as income or temperature before distance-based models.

  • ✓

    Parse date transform.

    Why this is correct

    The Parse date transform interprets the 'YYYY-MM-DD' string as a datetime type, from which Data Wrangler can derive year, month and day components. This satisfies the requirement to extract those three separate features without custom code.

  • ✗

    Handle missing transform.

    Why it's wrong here

    Handle missing addresses null or absent values through imputation or removal; it does not parse date strings into separate year, month and day features. It is tempting because data cleaning often precedes feature work, and would be correct when the date column contains blanks requiring imputation.

About these practice questions

This MLA-C01 question is part of Courseiva's 665-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 →

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.