Lesson 2 of 5 Data Transformation and Integration

Preparing Data Visually with AWS Glue DataBrew

This lesson explains AWS Glue DataBrew, the visual data preparation tool for analysts and data scientists who want to clean and normalise data without writing code.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe datasets, projects, recipes and jobs.
  • Profile data and evaluate data quality rules.
  • Choose between DataBrew, Data Wrangler and Glue ETL.

Projects, recipes and jobs

In DataBrew, a dataset points to data in S3, the Glue Data Catalog, Redshift or a JDBC database. A project opens an interactive sample of the dataset in a grid, where users apply transformations from more than 250 built-in functions: removing nulls, filling missing values, splitting and merging columns, standardising formats, one-hot encoding, binning, scaling and pivoting. Each step is recorded in a recipe.

A recipe job applies the recipe to the full dataset and writes the output to S3 in CSV, Parquet or other formats, on demand or on a schedule. Recipes are versioned and can be reused on new data, so the same preparation runs every time.

Put in order

A DataBrew workflow

Exam skills 1.2.1

Arrange the steps an analyst follows to clean data with DataBrew.

Log in to try this activity Interactive activities are free with an account.

Profiling and data quality

Before modelling, a team needs to understand a new dataset: how complete it is, how values are distributed and whether it contains sensitive data. A DataBrew profile job computes statistics for every column, including missing values, distinct values, distributions, outliers and correlations between columns, and detects personally identifiable information (PII).

Data quality rulesets define checks, such as "no more than 1% missing values in column age", which are evaluated during profile jobs and report pass or fail for each rule. Together, profiles and rulesets make DataBrew a quick, code-free way to assess whether a dataset is fit for modelling and to catch problems in new data before it reaches a training job.

DataBrew compared with other tools

Three AWS tools prepare data, and they suit different users and tasks. DataBrew is code-free and suits analysts preparing tabular datasets up to moderate size with its visual recipes. Glue ETL is code-based, using Spark or Python, and suits large or complex pipelines run in production by engineers.

SageMaker Data Wrangler is also visual, but it is focused on machine learning: it includes target leakage and bias analysis, trains quick models to estimate the value of features, and exports its flows to SageMaker Pipelines and Feature Store. Exam questions that mention preparing data specifically for a model, with bias or leakage checks, point to Data Wrangler. The following table summarises the difference.

ToolInterfaceBest for
Glue DataBrewVisual, no codeCleaning and normalising data for analytics and ML; profiling
SageMaker Data WranglerVisual plus custom code, in SageMaker CanvasML feature preparation integrated with SageMaker AI
Glue ETLCode (PySpark), Glue Studio visual editorLarge, scheduled, complex pipelines

The following diagram matches each situation to a preparation tool.

Choosing between the three preparation tools. An analyst cleaning tabular data without code uses Glue DataBrew; an ML practitioner who needs leakage and bias checks and export to SageMaker AI uses Data Wrangler; and an engineer running large, scheduled pipelines in code uses Glue ETL.
The tools can be combined in one pipeline.
Sort into groups

Which preparation tool?

Exam skills 1.2.1

Choose the data preparation tool that fits each team.

Log in to try this activity Interactive activities are free with an account.
Worked example

Cleaning a survey dataset

A marketing analyst with no programming experience must prepare survey responses for a propensity model. Ages are missing in 8% of rows, income has outliers, country names are inconsistent ("UK", "U.K.", "United Kingdom") and the data must be refreshed weekly.

  • Run a profile job to quantify missing values and outliers.
  • In a project, fill missing ages with the median, cap income at the 99th percentile and map country variants to one value.
  • Save the steps as a recipe and schedule a weekly recipe job that writes Parquet to S3.

The analyst never writes code, and the weekly job applies exactly the same steps to new data. A Glue ETL job would need PySpark skills the analyst does not have.

Check yourself

What does a DataBrew recipe record?

Show answer

The transformation steps, so the same cleaning can be applied to new data.

Exam Tips

Remember for the exam

  • Visual data preparation with no code: Glue DataBrew.
  • Recipes record transformation steps for reuse on new data.
  • Profile jobs show missing values, distributions and PII.
  • Data quality rulesets validate datasets in DataBrew.
  • ML-specific visual preparation tied to SageMaker AI: Data Wrangler.