MLA-C01 Data Preparation for Machine Learning Practice Question
A company uses Amazon SageMaker Data Wrangler to prepare data for ML. The dataset contains a timestamp column and sensor readings from IoT devices. The data scientist needs to create features such as moving averages and rolling statistics over time windows. Which Data Wrangler transformation type should be selected?
⚠ Common exam trap
Test-takers frequently confuse 'Group by and aggregate' with 'Window function' because both involve aggregation, but Group by reduces rows while Window functions preserve row-level detail, which is essential for rolling statistics.
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
✓
Window function
Window functions in Amazon SageMaker Data Wrangler allow you to compute moving averages, rolling statistics, and other time-window-based aggregations over ordered partitions of data. This is the correct transformation type because it directly supports operations like `SUM() OVER (ORDER BY timestamp ROWS BETWEEN 2 PRECEDING AND CURRENT ROW)` without requiring custom code or losing row-level granularity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Join
Why it's wrong here
Join merges rows across two datasets on a shared key; it cannot compute moving averages or rolling statistics within a single timestamped table. Joining is the right transformation when sensor readings must be enriched with reference data such as device metadata.
- ✗
Custom Python script
Why it's wrong here
A custom Python script could compute rolling statistics, but it requires manual coding of window logic and timestamp ordering, whereas Data Wrangler's dedicated time-series transformation provides these aggregations natively. Scripting suits bespoke calculations with no built-in equivalent, not standard moving averages.
- ✗
Group by and aggregate
Why it's wrong here
Group by and aggregate computes statistics within categorical groups, not across ordered time windows, so it cannot produce moving averages or rolling statistics. It is tempting because it is the standard aggregation transform, and would be correct for per-device summary metrics such as mean reading per sensor rather than temporal windows.
- ✓
Window function
Why this is correct
Window functions compute rolling aggregates across ordered partitions, so moving averages and rolling statistics over the timestamp column are produced directly within Data Wrangler. This satisfies the requirement for time-windowed feature engineering, unlike row-level transforms such as numeric or categorical encodings, which cannot aggregate across neighbouring rows.
Go deeper
Related to this question
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 →
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.