Lesson 3 of 6 AWS Glue

Preparing Data Visually with AWS Glue DataBrew

This lesson explains how AWS Glue DataBrew, a visual, no-code tool, lets analysts and data scientists explore, clean and normalise data and turn their steps into repeatable jobs.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe datasets, projects, recipes and jobs.
  • Identify the categories of built-in transformations.
  • Profile data and evaluate data quality rules.

Projects and recipes

AWS Glue DataBrew cleans and prepares data visually, without code, around a few concepts. A dataset points to data in S3, the Data Catalog, Redshift or a JDBC database. A project is an interactive workspace that shows a sample of the dataset, where you apply and preview transformations. The steps are saved as a recipe, a versioned list of transformations that can be reused.

A recipe job applies a recipe to the full dataset, on demand or on a schedule, and writes the result. A profile job computes statistics about a dataset, such as missing values and value distributions, to assess its quality. The following table summarises the concepts.

ConceptMeaning
DatasetA pointer to data in S3, the Data Catalog, Redshift or a JDBC database
ProjectAn interactive workspace showing a sample of the dataset
RecipeThe saved, versioned list of transformation steps
Recipe jobApplies a recipe to the full dataset, on demand or on a schedule
Profile jobComputes statistics about the dataset

The following diagram shows an analyst's DataBrew recipe and the jobs that use it.

The analyst's DataBrew recipe. Four steps remove duplicate rows, map country values to GB, format phone numbers to E.164 and fill missing categories. A scheduled recipe job applies the published recipe to each new file and writes Parquet to the curated zone, and a profile job shows missing values before and after.
The recipe is built on a sample in a project and then published.
Match the pairs

DataBrew concepts

Exam skills 3.1.6

Match each DataBrew concept with its meaning.

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

Transformations

AWS Glue DataBrew lets analysts clean and prepare data visually, choosing from more than 250 built-in transformations. Cleaning transformations remove duplicates, fill or remove missing values, and trim and standardise text. Restructuring transformations split and merge columns, pivot and unpivot tables, and nest or unnest values.

Formatting transformations standardise dates, numbers and letter case. Protection transformations detect personal information and mask, hash or encrypt it, so sensitive data can be prepared safely. The transformations an analyst applies are saved as a recipe, which a DataBrew job then runs on the full dataset, on demand or on a schedule.

Sort into groups

DataBrew transformation families

Exam skills 3.1.6 · 4.3.1

Decide which family each DataBrew transformation belongs to.

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

Profiling

Profile jobs report column statistics: value distributions, missing and distinct values, outliers and correlations between columns. Profiles can also evaluate data quality rulesets, so analysts see at a glance whether a dataset is fit for use before building reports on it.

Worked example

An analyst cleans a monthly supplier file

A procurement analyst receives a monthly supplier file with inconsistent country names, duplicate rows and phone numbers in several formats. The analyst knows no Python. In a DataBrew project the analyst builds a recipe with the following steps.

StepTransformation
1Remove duplicate rows
2Replace country values using a mapping (UK, U.K. and United Kingdom become GB)
3Format phone numbers to E.164
4Fill missing categories with "Unknown"

The recipe is published and a scheduled recipe job applies it to each new file, writing Parquet to the curated zone. A profile job shows the analyst the share of missing values before and after, so the improvement can be demonstrated.

Check yourself

Which DataBrew job produces column statistics and distributions?

Show answer

A profile job. Recipe jobs apply cleaning steps.

Exam Tips

Remember for the exam

  • No-code data cleaning by analysts points to Glue DataBrew and its recipes.
  • Column statistics and distributions come from a DataBrew profile job.
  • To apply the same cleaning steps every day, schedule a recipe job.
  • DataBrew can detect and mask PII during preparation.
  • DataBrew projects work on a sample; recipe jobs process the full dataset.