CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
  • Week 1
    • 1.The ML Lifecycle and the Role of the ML Engineer
    • 2.ML Problem Types and Evaluation Metric Basics
    • 3.AWS ML Stack at a Glance
    • 4.SageMaker Overview: Studio, Training/Inference, Built-in Algorithms
    • 5.Week 1 Comprehensive Review — ML Fundamentals & AWS Stack
  • Week 2
  • Week 3
    • 1.Feature Engineering: The Art of Turning Data into Numbers a Model Can Read
    • 2.SageMaker Data Wrangler: No-Code Data Preparation
    • 3.SageMaker Feature Store: Managing Features as Assets
    • 4.Data Bias·Quality: Clarify, Class Imbalance Handling, Data Split
    • 5.Week 3 Comprehensive Review — Feature Engineering·Data Quality
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← MLA-C01/Week 3/Day 2

Based on the MLA-C01 exam guide·Report an error

MLA-C01· AssociateWeek 3 · Day 2~28 min read

Day 2 - SageMaker Data Wrangler: No-Code Data Preparation

📌 Key Takeaways

  • Data Wrangler is a data preparation tool that bundles four stages into a GUI: connect source → transform → analyze → export.
  • The core concept is the flow — it leaves the transformation steps as a DAG with a fixed order, which guarantees reproducibility.
  • The data you see on screen is a sample. Applying to the full data is done by the exported Processing Job.
  • Data Quality report, Quick Model, and Target Leakage analysis catch data problems before training.
  • Exporting to Pipelines or Feature Store lets training and inference use the same transformation, preventing training/serving skew.

What Is Data Wrangler

Hand-coding yesterday's scaling, encoding, and missing value handling in pandas every time takes a long time, and it is hard to reproduce the order of the transformations you applied. Data Wrangler is a built-in SageMaker Studio tool that bundles this whole flow into a visual interface.

The core is the concept of a flow. A flow is a directed graph (DAG) running from the data source → transformation steps → output, in which each node is one data processing step. When the user adds a transformation in the GUI, Data Wrangler internally generates the corresponding code (pandas/PySpark).

[S3 data source]
      |
      v
[Missing value imputation: median]
      |
      v
[One-Hot encoding: category]
      |
      v
[StandardScaler: numeric]
      |
      v
[Output: Feature Store / S3 / Pipeline]

It provides more than 300 built-in transformations, so most common preprocessing is solved without code. If you need custom logic, you can also insert Python (pandas), PySpark, or SQL code blocks directly.

Difference from hand-coding in a notebook

CategoryHand-coding in a notebookData Wrangler flow
Transformation orderDepends on the cell execution orderFixed in the graph
ReproducibilityLow (who ran it in what order?)High (the flow file is the blueprint)
Exploration speedNeeds time to write codeInstant with clicks
Large-scale applicationImplement distributed processing yourselfProcessing Job export
Quality checksWrite the code yourselfAutomatic reports provided

A Data Wrangler flow is a visualization of a data engineering ETL/ELT pipeline. Because each transformation is idempotent and expressed as a DAG with a clear order, applying the same transformation to the same input always produces the same output. This reproducibility is the core value of an ML pipeline. A hand-coded notebook gives different results depending on the cell execution order, but in a flow the order is fixed in the graph.

Connecting Various Data Sources

Data Wrangler imports data directly from several sources. The exam has questions asking "where can data be loaded from."

Data sourceUseStrength
Amazon S3Most common. CSV, Parquet, JSON, etc.Directly tied to the data lake
Amazon AthenaQueries data on S3 with SQL and loads the resultOnly the needed part via WHERE
Amazon RedshiftDirectly from the data warehouseAlready-refined structured data
Snowflake / DatabricksExternal data platformsMulti-platform environments
SageMaker Feature StoreReuse features already builtLeverage assets shared across teams

The Athena integration is especially useful. Without downloading an entire huge S3 dataset, you can sample and load only the needed part with a SQL WHERE clause.

⚠️ Trap: The data you see in Data Wrangler is by default a sample (the top N rows or a random sample). Even if you confirm a transformation in the on-screen preview, to apply it to the actual full data you must export it and run it as a SageMaker Processing Job. Even if it looks fine on the sample, the result can differ if the distribution of the full data is different, so you need to be aware of the sample size and method.

Transform

Data Wrangler's transformations are the feature engineering you learned yesterday moved into a GUI.

CategoryRepresentative transformationsCorresponding feature engineering
Missing value handlingdrop, impute (mean/median/most frequent), missing flagImputation strategies
EncodingOne-Hot, Ordinal, categorical handlingNominal/ordinal encoding
Scalingstandardize, normalize, robust scalerThe three scalers
Numeric transformationlog/square root, binningSkew correction, binning
Text/dateString parsing, extracting year/month/day from datesDerived feature creation
Dimensionality reductionPCAHigh-dimensional compression
Domain-specificTime series resampling, image augmentation, text tokenization—
# Data Wrangler transformations are composed by clicking in the GUI
# and generated as a notebook/script/Processing Job definition on export (concept)
#
# The .flow file holds the transformation definition, and a Processing Job applies it to the full data.
#   flow (blueprint)  →  export  →  Processing Job (runs on the full data)

Data Wrangler has a feature called Quick Model that instantly trains a tree-based model on the transformation results so far and shows the expected performance and feature importance in advance. This lets you quickly verify "does this transformation actually help model performance" before full-scale training. It also automatically detects features that leak target information through Target Leakage analysis.

Analyze

As important as transformation is understanding the data. Data Wrangler provides several analysis visualizations with a single click.

Analysis featureWhat it tells youFollow-up action
Data Quality and Insights ReportMissing values, duplicates, target leakage, class imbalance, feature importanceGrasp the whole picture, then decide priorities
Histogram/scatter plotDistribution and correlationDecide on log transform and outlier handling
Quick ModelInstant performance estimate and feature importanceDrop meaningless features
Target LeakageFeatures that leak target informationRemove those features
Bias Report (Clarify integration)Bias by sensitive attributeRe-collect or resample data (Day 4)
MulticollinearityMulticollinearity among variablesClean up redundant features

These reports automate what you learned yesterday: "check the data dictionary, understand the missingness mechanism, detect outliers."

One team was building a churn prediction model and included a "last login date" feature, but it turned out that only customers who had churned had this value filled in (it was recorded at the time of churn). Data Wrangler's Target Leakage analysis caught this feature's abnormally high predictive power and uncovered the leakage in advance. Had the leaking feature been left in, offline validation accuracy would have been 99%, but it would have been useless in the live service.

Export

Once the flow is complete, you can export it to several destinations. The exam has questions that distinguish the export options.

Export targetMeaningWhen to choose it
SageMaker Processing JobRun a batch job that applies the transformations to the full dataApply the sample-designed flow to everything
SageMaker Feature StoreLoad the processed features into the Feature Store (Day 3)Cross-team reuse, training/inference consistency
SageMaker PipelinesIntegrate the transformations as an ML pipeline stepBuild an automatic retraining pipeline
Python code / Jupyter NotebookExtract the transformation logic as code for reuseIntegrate into an existing codebase
S3Save the processed result to S3Simple result storage

Data Wrangler itself is a preview/design tool, and the actual large-scale processing is carried out by the exported Processing Job. The flow (.flow file) is a blueprint holding the transformation definition, and re-running it applies the same transformation to new data too, which guarantees reproducibility.

                    ┌──> Processing Job ──> Apply transformations to the full data
                    │
[.flow blueprint] ──┼──> Feature Store ───> Training and inference share the same features
                    │
                    ├──> Pipelines ───────> Incorporated as an automatic retraining step
                    │
                    └──> Python/Notebook ─> Extracted as code and managed directly

The flow from Data Wrangler → Feature Store → Pipelines implements the MLOps "feature pipeline." If you make data preparation not a one-off notebook task but a version-controlled, re-runnable pipeline step, the same transformation is applied at training time and at inference time (preventing training/serving skew). This ties directly to the Feature Store consistency in Day 3.

Data Wrangler vs Other Tools

When to choose Data Wrangler is an exam point.

RequirementCorrect toolReason
Fast visual exploration and transformation prototypingData WranglerGUI, visualization, instant model validation
Large-scale distributed ETLAWS Glue (Spark) / EMRDistributed processing engines are their core job
Pure SQL transformationAthena (CTAS)SQL alone is enough
A pipeline already well organized as codeSageMaker Processing Job directlyGUI steps are unnecessary
No-code + data profiling (outside ML)Glue DataBrewGeneral-purpose cleaning for analysts

Data Wrangler's strength lies in the "exploration and design" stage: GUI, visualization, and instant model validation.

⚠️ Trap: If you see the phrase "process hundreds of GB with Data Wrangler," what is exactly happening is exporting the flow as a Processing Job to process it. You must distinguish that the Data Wrangler screen itself does not process large volumes.

Managing the Gap Between the Sample and the Full Data

What Data Wrangler handles on screen is a sample. The points where this fact causes problems in practice are well defined.

What is not visible in the sampleWhat happens when applied to everythingPrevention
Rare category valuesCategories never seen before appear during encodinghandle_unknown handling, check the category list
Minority classUnderestimates the degree of imbalanceCheck the full class distribution with Athena first
Outliers in a particular periodScaler statistics changeSample so that periods are evenly included
Seasonality in the missingness patternThe imputation strategy goes offCheck the overall missing rate with a separate query
  • With an Athena source, you can use WHERE to adjust the period and conditions to build a representative sample.
  • The final judgment is always made from the result of running the full data through a Processing Job.

Reproducibility Lineage of the Preprocessing Pipeline

[.flow file]        ← Transformation definition (blueprint). Subject to version control
     │ export
     v
[Processing Job]    ← Actually applied to the full data
     │ output
     v
[Feature Store]     ← Store that training and inference read together
     │
     └─> [Pipelines] When incorporated as a step, the same transformation is applied automatically at every retraining

The place where this lineage breaks is exactly the place where skew arises.

How the lineage breaksResult
The flow is not exported and is moved by hand into a notebookOrder and parameters differ subtly
The inference server implements preprocessing separatelytraining/serving skew
The transformation definition is not version-controlledPast models cannot be reproduced
Processing Job results are saved to a temporary pathCannot trace which data was used for training

The statement "I preprocessed with Data Wrangler" alone does not guarantee reproducibility. Only when you export the flow and pin it as a pipeline step do training and inference use the same transformation.

One-Line Tool Selection Summary

Clue in the questionAnswer
"Without code", "visually", "explore quickly"Data Wrangler
"Data quality, leakage, and imbalance as an automatic report"Data Wrangler analysis features
"Actually apply the transformation to hundreds of GB"Export to a Processing Job
"Make training and inference use the same transformation"Export to Feature Store / Pipelines
"Large-scale distributed ETL is the core job"Glue Spark / EMR
"Transform with SQL only"Athena CTAS

In the next lesson we look at SageMaker Feature Store, which stores the processed features and serves them in a reusable and consistent way.

📖 Glossary

  • Data Wrangler : A data preparation tool inside SageMaker Studio for loading data and transforming and analyzing it by clicking.
  • flow : A graph running from the source through the transformations to the output. It fixes the transformation order to create reproducibility.
  • DAG (directed acyclic graph) : A task graph whose arrows flow in only one direction and never loop back.
  • Idempotent : The property that applying the same processing to the same input any number of times gives the same result.
  • Sample : A subset of rows rather than the whole. The Data Wrangler screen shows a sample by default.
  • Processing Job : A SageMaker batch job that applies preprocessing to the full data. The actual executor of a flow.
  • Data Quality and Insights Report : A report that automatically extracts missing values, duplicates, leakage, imbalance, and feature importance.
  • Quick Model : A feature that instantly trains a model on the current transformation state and shows performance and feature importance in advance.
  • Target Leakage analysis : A diagnosis that finds features into which target information has leaked, by their abnormally high predictive power.
  • Feature importance : The degree to which each feature contributed to the prediction.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A data scientist wants to design preprocessing by clicking GUI alone for missing imputation, One-Hot encoding, scaling, and visualizing distribution quickly. Most suitable tool?

Question 2

Transformations previewed on screen look good in Data Wrangler. To apply them to hundreds of GB of full dataset?

Question 3

Data Wrangler warns "last payment date" feature predicts target abnormally well. Which analysis caught this, and what suspect?

Question 4

Want to load selective portions of huge S3 datasets via SQL condition in Data Wrangler. Most suitable source connection?

Question 5

Want to reuse Data Wrangler preprocessing flow identically for training/inference to prevent training/serving skew. Most appropriate export strategy?

PreviousFeature Engineering: The Art of Turning Data into Numbers a Model Can ReadWeek 3 · Day 1Next SageMaker Feature Store: Managing Features as AssetsWeek 3 · Day 3

Official references

  • MLA-C01 official exam page(opens in a new tab)
  • Amazon SageMaker AI documentation(opens in a new tab)
  • Amazon S3 documentation(opens in a new tab)
  • Amazon Athena documentation(opens in a new tab)
  • AWS Glue documentation(opens in a new tab)

On this page

  • Key Takeaways
  • What Is Data Wrangler
  • Connecting Various Data Sources
  • Transform
  • Analyze
  • Export
  • Data Wrangler vs Other Tools
  • Managing the Gap Between the Sample and the Full Data
  • Reproducibility Lineage of the Preprocessing Pipeline
  • One-Line Tool Selection Summary
  • Glossary
  • Practice Questions