Domain 1 of 4 · Chapter 2 of 3

Data Transformation & Feature Engineering

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing AWS Certified Machine Learning Engineer - Associate premium course — no separate purchase.

Included in this chapter:

  • Which transform tool when: Data Wrangler, DataBrew, Glue, EMR
  • Cleaning and feature engineering: the transforms that matter
  • SageMaker Feature Store: online vs offline store
  • Labeling with Ground Truth and exam-pattern recognition

Choosing a data-transformation tool on AWS

DimensionData WranglerGlue DataBrewAWS Glue (Spark)Spark on EMR
InterfaceVisual flow in SageMaker CanvasNo-code visual recipesVisual (Glue Studio) or Spark codeSpark code on a cluster
Primary userData scientist doing EDAAnalyst cleaning dataData engineer building ETLEngineer needing cluster control
ScaleSampled flows, export to jobTerabytes, serverlessAny size, serverless SparkVery large, tunable cluster
CodingLittle to none, custom PySpark optionalNonePySpark or ScalaFull Spark control
Best forExplore then export to pipeline/Feature StoreRepeatable no-code cleaningScheduled large scripted ETLCustom or very large transforms
Catalog/recipe reuseReusable .flow fileReusable recipeGlue Data Catalog + jobsSelf-managed

Decision tree

Transform the data, or serve/store features? Interactive visual EDA by a data scientist? Read at real-time inference latency? Data Wrangler explore, export flow No-code, no cluster, analyst recipes? Feature Store online store Feature Store offline (S3, train) Glue DataBrew 250+ recipes Scripted ETL, no cluster to manage? AWS Glue serverless Spark Spark on EMR cluster control Transform Serve/store Yes No Yes No Yes No Yes No

Cheat sheet

  • Use Data Wrangler for visual EDA that exports into a pipeline
  • Use Glue DataBrew for no-code cleaning with reusable recipes
  • Use AWS Glue for serverless, scripted, repeatable Spark ETL
  • Choose EMR over Glue only when you need cluster control
  • Glue FindMatches deduplicates records that are imperfect matches
  • One-hot encode low-cardinality nominal categories
  • Use ordinal or label encoding only when a real rank exists
  • High-cardinality categoricals need binary, hashing, or embeddings
  • Standardize with the mean and variance, normalize to a fixed range
  • Skip scaling for tree-based models
  • Impute missing values with a statistic learned from training data
  • Detect outliers with IQR or standard-deviation rules, then cap or transform
  • Feature splitting and binning expose hidden structure
  • Feature Store online store serves the latest record at ms latency
  • Feature Store offline store keeps full history in S3 for training
  • Write both Feature Store stores to kill train-serve skew
  • A feature group needs a record identifier and an event time
  • Use Ground Truth to label data, choosing one of three workforces
  • Ground Truth automated data labeling uses active learning to cut cost
  • Transform streaming records with Lambda for per-record work
  • Data Wrangler can export an engineered flow straight into Feature Store
  • SageMaker Processing reads and writes only under /opt/ml/processing/
  • SageMaker Processing exposes job and cluster config in /opt/ml/config JSON files
  • ShardedByS3Key splits objects across instances; FullyReplicated copies all data to each
  • Use a framework processor for built-in libraries and ScriptProcessor for a custom container
  • Glue job bookmarks with transformation_ctx process only new data incrementally
  • Glue DynamicFrames encode mixed-type fields as choice types, resolved with resolveChoice
  • Glue ETL updates the Data Catalog itself with enableUpdateCatalog + UPDATE_IN_DATABASE
  • Use Apache Iceberg for the Feature Store offline store to get time-travel and compaction
  • Backfill the offline store directly with the Feature Store Spark connector, target_stores=OfflineStore
  • Data Wrangler custom transforms should use PySpark (not pandas) for large datasets
  • Data Wrangler Quick Model rates predictive power; Target Leakage flags features unavailable at prediction time
  • DataBrew recipes use named steps for imputation, scaling, and encoding

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Prepare ML Data with Amazon SageMaker Data Wrangler
  2. Data preparation in SageMaker Canvas (Data Wrangler experience)
  3. Export a Data Wrangler flow
  4. What is AWS Glue DataBrew?
  5. What is AWS Glue?
  6. Apache Spark on Amazon EMR
  7. AWS Lambda - What is AWS Lambda?
  8. Create, store, and share features with SageMaker Feature Store
  9. Training data labeling with Amazon SageMaker Ground Truth
  10. Automate data labeling (Ground Truth active learning)