Lesson 2 of 5 Data Pipeline Orchestration

Orchestrating Glue-Only Pipelines with Glue Workflows

This lesson explains how Glue workflows orchestrate pipelines made only of Glue crawlers and jobs, with a visual graph, triggers between steps and shared run state.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the building blocks of a Glue workflow.
  • Distinguish scheduled, on-demand, conditional and event triggers.
  • Recognise when a pipeline needs a different orchestrator.

Building blocks

A Glue workflow chains crawlers and jobs into one pipeline that can be monitored as a unit. Crawlers and jobs are the steps that discover and transform the data. Triggers connect them, starting steps on a schedule, on demand, when earlier steps reach a state, or on events. Run properties are key-value pairs shared by every step in one run, so a job can pass a value, such as the date being processed, to the next. Blueprints are parameterised templates that generate complete workflows for common patterns, such as importing tables from a database. The following table summarises the components.

ComponentRole
Crawlers and jobsThe steps that discover and transform data
TriggersStart steps on a schedule, on demand, on conditions or on events
Run propertiesKey-value pairs shared by every step in a workflow run
BlueprintsParameterised templates that generate workflows for common patterns
Match the pairs

Glue workflow components

Exam skills 1.3.1

Match each Glue workflow component with its role.

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

Trigger types

Glue offers four trigger types. A scheduled trigger starts steps on a cron schedule, and an on-demand trigger starts them when called manually or through the API. A conditional trigger watches other jobs or crawlers and fires when they reach a state, which is how dependencies are built, such as running job B only after job A succeeds. An EventBridge trigger starts the workflow on events, such as files arriving in S3. It can batch events, waiting for a number of them or for a time window, so one run processes many small files together. The following table summarises the trigger types.

TriggerStarts steps
ScheduledOn a cron schedule
On demandWhen started manually or through the API
ConditionalWhen watched jobs or crawlers reach a state, such as job B after job A succeeds
EventBridgeOn events, with batching after a number of events or a time window

The following diagram shows the steps of a Glue workflow and the triggers that start them.

The Glue-only workflow. An EventBridge trigger starts the raw crawler after 100 file events or 15 minutes, conditional triggers start the conversion job when the crawler succeeds and the curated crawler when the job succeeds, and a run property carries the batch identifier through the run.
The batch identifier format is illustrative.

Limits of Glue workflows

Glue workflows coordinate only Glue resources. Pipelines that also call Lambda, EMR, Athena, Redshift or SNS, or that need complex branching, retries with backoff and human approval, are better orchestrated with Step Functions, which can itself start Glue jobs and crawlers.

Scenario questions

Glue workflow or Step Functions?

Exam skills 1.3.1

Choose the orchestrator for each pipeline.

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

A Glue-only pipeline triggered by file batches

Hundreds of small files arrive in the raw zone each hour. A crawler must register them, then a job must convert them to Parquet, then a second crawler must update the curated table. Every step is in Glue. The workflow is built from the triggers described in the following table.

TriggerTypeStarts
StartEventBridge, batch size 100 or 15 minutesRaw crawler
After raw crawler succeedsConditionalConversion job
After conversion job succeedsConditionalCurated crawler

Batching means one workflow run processes many files, rather than one run per file. A run property holds the batch identifier, which the job writes into its output for traceability.

Check yourself

How does a Glue workflow start job B only after job A succeeds?

Show answer

With a conditional trigger that watches job A's state.

Exam Tips

Remember for the exam

  • To chain a crawler, a job and another crawler entirely within Glue, use a Glue workflow.
  • To start job B only after job A succeeds, use a conditional trigger.
  • To start a workflow after a batch of S3 events, use an EventBridge trigger with batching.
  • To pass values between steps, use workflow run properties.
  • Pipelines that span other services suit Step Functions rather than Glue workflows.