---
title: "AWS Glue Data Quality: Rules, Recommendations and Monitoring"
description: "How AWS Glue Data Quality works: DQDL rules, recommended rules, anomaly detection, where to place checks, what drives cost and where it falls short."
canonical: https://shipshapedata.com/resources/data-architecture/aws-glue-data-quality/
language: en-GB
author: "Emile Van Zyl"
author_role: "MarTech Automation Consultant"
author_url: https://www.linkedin.com/in/emile-vanzyl-enhancing-your-human-advantage/
date_published: 2026-11-23
date_modified: 2026-11-23
---

# AWS Glue data quality: rules, recommendations and monitoring

> How AWS Glue Data Quality works: DQDL rules, recommended rules, anomaly detection, where to place checks, what drives cost and where it falls short.

Section: Home > Resources > Data & architecture

Canonical page: https://shipshapedata.com/resources/data-architecture/aws-glue-data-quality/
By Emile Van Zyl, MarTech Automation Consultant (https://www.linkedin.com/in/emile-vanzyl-enhancing-your-human-advantage/) | published 2026-11-23

Your Glue jobs run on schedule and the tables land in Amazon S3 as expected. Then a finance report shows a total that nobody can explain, and the first sign of trouble is a person noticing it. Data quality checks exist to move that moment earlier, to the point where the data arrives rather than the point where someone reads it.

AWS Glue Data Quality is a feature of AWS Glue that checks data against rules you write in a declarative language called DQDL. It can recommend rules from data statistics, detect anomalies over time, and run checks inside Glue ETL jobs or against tables in the Glue catalogue, with results sent to CloudWatch and EventBridge.

This guide is for data engineers and data leads who already run pipelines on AWS and want to decide how far the native tooling will take them. It explains how the rules work, how recommendations and anomaly detection behave, where to place checks in a medallion design, what drives the cost, and which gaps you will need to fill with other tools or with process.

It is the AWS counterpart to our guide to data quality checks on Databricks. The principles are the same on both platforms. The mechanics, and the places where each one stops, are different.

## What AWS Glue Data Quality is

AWS Glue is the serverless data integration service on AWS. It provides a central catalogue that records tables and schemas, crawlers that discover data in storage, and Spark-based jobs that extract, transform and load it. AWS Glue Data Quality is a capability inside that service. It measures and monitors data against rules you define, so that you can see which data needs action before it reaches a report or a model.

AWS has stated that the feature is built on Deequ, the open-source library Amazon developed for testing large datasets on Spark. You do not need to know Deequ to use it. The practical point is that every check runs as a Spark computation over your data. That is why run time, and therefore cost, grows with data volume and with the number of rules.

The feature does three jobs:

- Rules: you describe what good data looks like in the Data Quality Definition Language (DQDL), and each run reports which rules passed and which failed.
- Recommendations: the service profiles a table and proposes a starting set of rules based on what it finds.
- Monitoring: results are kept as a history, published as metrics and events, and used for anomaly detection across runs.
If you are still choosing the wider set of AWS services for ingestion, storage and serving, our guide to AWS data engineering services and skills sets out where Glue fits alongside S3, Athena, Redshift and Lambda.

## Rules and DQDL

DQDL is a short declarative language. A ruleset is a list of rules inside a Rules block. Each rule names a rule type, a target column or the whole dataset, and an expression that the data must meet. A ruleset for an orders table might read: Rules = [ IsComplete "order_id", IsUnique "order_id", ColumnValues "status" in [ "open", "shipped", "closed" ], DataFreshness "updated_at" <= 24 hours ].

### Common rule types

- IsComplete and Completeness: check that a column has no nulls, or that the share of non-null values meets a threshold you set.
- IsUnique and Uniqueness: check that a key column has no duplicates.
- ColumnValues: check that values fall in an allowed set, a range or a pattern.
- RowCount: check that the dataset has the number of rows you expect.
- DataFreshness: check that the newest record is recent enough for the people who use it.
- ReferentialIntegrity: check that values in one dataset exist in another, such as order lines that point to real orders.
- CustomSql: express a rule the built-in types do not cover, written as a SQL statement over the dataset.
Most of these map directly to the standard measures of quality: completeness, uniqueness, validity, consistency and timeliness. Our guide to data quality dimensions and how to measure them explains each one and the metrics that sit behind it. Accuracy is the dimension DQDL covers least well, because checking accuracy usually means comparing data with an outside source of truth.

### Dynamic rules

Fixed thresholds break as data grows. A rule that says an orders table must have more than a set number of rows passes on a quiet day and still passes on a day when half the orders are missing, as long as the business is large enough. Dynamic rules solve this by comparing the current run with previous runs. Functions such as last, avg and min read the history, so a rule like RowCount >= min(last(5)) fails when today's load is smaller than any of the last five. Dynamic rules need a history to compare against, so they become useful after a pipeline has run for a while.

### Agree the rules before you write them

The syntax is the easy part. The hard part is agreeing what valid means. Whether a null discount is an error or a normal value is a business decision, not an engineering one. Write the expectations down with the team that owns the data and the teams that consume it. A written agreement of this kind is a data contract, and DQDL is one way to enforce it.

## Recommended rules and anomaly detection

A recommendation run profiles a table in the Glue catalogue. It computes statistics for each column, such as completeness, distinct values and value ranges, and turns them into a proposed DQDL ruleset. This saves time on wide tables, where writing every rule by hand would take days.

Treat the output as a first draft. Recommendations describe the data as it is today, including any faults it already has. If a column is currently half empty, the recommended completeness threshold will accept half empty. Review each proposed rule with the data owner, remove rules that only describe an accident of the current data, and tighten the ones that matter.

Anomaly detection works differently. You add analysers to a ruleset. An analyser gathers statistics on each run without passing or failing anything. Over several runs, the service learns the normal pattern for each statistic and flags values that fall outside it. It can also suggest new rules based on what it has observed. This catches problems you did not think to write a rule for, such as a sudden change in the average order value or the number of distinct customers.

Anomaly detection needs history, and it needs care with seasonal data. A retail table will look unusual every December. Review flagged anomalies before you turn them into blocking rules, and record why each one was accepted or rejected.

> Recommended rules describe your data as it is. Your rules should describe it as it should be.

## Pipelines versus the catalogue

You can run checks in two places, and most teams use both.

### Checks inside Glue ETL jobs

In a Glue job you add an Evaluate Data Quality step, either as a transform in Glue Studio or in the job script. The check runs while the data is in flight, before it is written. You then decide what a failure does. The job can stop, it can continue and publish the results, or it can produce row-level outcomes that let you send passing rows on and failing rows to a quarantine location for review. AWS has also published patterns for running the same checks on Amazon EMR workloads, so the approach is not limited to Glue jobs.

### Checks on catalogue tables

You can also attach a ruleset to a table in the Glue catalogue and run it on demand or on a schedule. This does not require a change to the job that writes the data. It suits tables written by other tools, tables you inherit, and periodic audits of data that is already at rest. The results are stored against the table, so you can see the quality history in one place.

### How to choose

- Use in-pipeline checks when bad data must be stopped or quarantined before anyone downstream can read it.
- Use catalogue checks when you need to monitor data you do not control, or when changing the writing job is not practical.
- Use both when a table is critical: the pipeline check blocks known failures, and the scheduled catalogue check confirms the table stays healthy between loads.

## Where checks belong in a medallion design

A medallion architecture cleans data in stages: bronze holds raw data as it arrived, silver holds cleaned and conformed data, and gold holds the business-ready tables that reports and models read. Each layer needs different checks, and putting every rule in one place either blocks too much or catches too little.

- Bronze: check structure and arrival. Row counts, freshness, schema and the presence of key columns. Record failures and alert, but usually do not block, because bronze is meant to keep what the source sent.
- Silver: check content. Completeness, uniqueness of keys, allowed values, formats and referential integrity between tables. This is where blocking rules and row-level quarantine do the most good.
- Gold: check business meaning. Totals that reconcile with the source system, metrics that stay within expected ranges, and dynamic rules that catch sudden shifts in the numbers people make decisions on.
Gold checks matter most and are written least often. A table can pass every structural rule and still report the wrong revenue figure, because a join changed or a filter was dropped. Reconciliation rules, written with CustomSql or as comparisons against source totals, are the checks that protect the numbers a finance team will sign off. They depend on one agreed definition of each metric, which is what a semantic layer provides.

> Decide what a failure means at each layer before you write the rule.

## What drives the cost

AWS charges for Glue Data Quality as compute time, measured in the same data processing unit hours as other Glue work. Recommendation runs, scheduled catalogue evaluations and anomaly detection all consume that compute. In-pipeline checks add run time to the job they sit in. Check the current AWS pricing page for your region, because rates and free allowances change.

The cost depends on a small number of drivers:

- Data volume: every rule scans data, so larger tables and full-table scans cost more than checks on new partitions only.
- Rule type: uniqueness on high-cardinality columns, referential integrity across large tables and complex CustomSql rules take longer than completeness or row counts.
- Frequency: an hourly catalogue check costs many times more than a daily one on the same table.
- Profiling: recommendation runs and analysers for anomaly detection compute statistics on top of the rules themselves.
- Row-level outcomes: splitting and writing failing rows to quarantine adds processing and storage.
- Surrounding services: CloudWatch metrics, EventBridge rules, notifications and the storage of results all carry their own charges.
The way to control cost is the same as the way to get value: put the heavier rules where a bad record does the most damage, usually silver and gold, and keep bronze checks light. Run checks on new data where your setup allows it rather than rescanning whole tables.

## Where it falls short and what to pair it with

AWS Glue Data Quality is good at one thing: checking known rules on data that Glue can read. If your platform sits on AWS and your data passes through Glue, it is often the right first layer of quality control. It has limits you should plan for.

- Scope: it checks data inside the reach of Glue. Data in other clouds, in SaaS tools, or in the BI layer after it leaves your tables needs another check.
- Incident handling: it produces results, metrics and events. Routing alerts to the right owner, grouping related failures and tracking resolution are things you build yourself, usually with EventBridge and a notification service.
- Impact: a failed rule tells you which table is wrong. It does not tell you which dashboards, reports or models read that table. You need lineage for that.
- Rules at scale: rulesets are written per table. Keeping hundreds of them versioned, reviewed and consistent is a discipline you need to impose, ideally by keeping rulesets in source control and deploying them with your pipelines.
- Unknown problems: anomaly detection helps, but dedicated data observability platforms profile a whole warehouse for freshness, volume, schema and distribution changes without per-table setup.

### What to pair it with

If you want checks that move with you across platforms, open-source frameworks such as Great Expectations for automated validation or Soda and its SodaCL checks run on AWS and elsewhere. If you need broad monitoring across many tables, compare the open-source data observability tools available. Lineage tooling answers the impact question, and a data quality dashboard gives owners and executives a view of results they will read.

Tools only enforce what people have agreed. Every rule needs an owner who will act on a failure, a written definition of the data it protects, and a decision about what happens when it fails. A check that nobody owns becomes a log entry, not a control.

## Where this leaves you

If your data runs through AWS Glue, Glue Data Quality is a sensible place to start. Use recommendations to draft rules, then review them with the people who own the data. Place light structural checks on bronze, blocking and quarantine rules on silver, and reconciliation rules on gold. Add dynamic rules and anomaly detection once you have a history of runs to compare against.

Plan for the gaps from the start. Decide who receives each alert, how you will see which reports a failure affects, and whether you need monitoring beyond the tables Glue can reach. The tool will run the checks. The agreed definitions, the ownership and the layered design are what make the results worth trusting.

Quality checks are one part of a governed platform. Our data foundation service builds the cloud data warehouse, the bronze, silver and gold layers and the semantic layer that give every check a clear definition to test against, and we stick around past go-live to keep it working. If you want to know where checks belong in your own pipelines, or whether the native AWS tooling is enough for what you need, we will give you an honest answer. Talk to us and we will say if we are not the right fit.

## Frequently asked questions

You write rules in the Data Quality Definition Language (DQDL), or start from rules the service recommends after profiling a table. The rules run either inside a Glue ETL job, where a failure can stop the job or send failing rows to quarantine, or against a table in the Glue catalogue on demand or on a schedule. Each run records which rules passed and failed, publishes metrics and events, and builds a history that dynamic rules and anomaly detection use to spot unusual changes over time.

AWS Glue is the serverless data integration service on AWS. It includes a central catalogue that records tables and schemas, crawlers that discover data in storage such as Amazon S3, and Spark-based jobs that extract, transform and load data. You do not manage servers. AWS Glue Data Quality is a capability inside the service that checks data against rules, either during Glue jobs or on tables in the catalogue.

The Glue catalogue has a free allowance for stored objects and requests, but Glue jobs, crawlers and data quality runs are charged as compute time. Recommendation runs, scheduled catalogue checks and anomaly detection all consume that compute, and in-pipeline checks add time to the job they sit in. Free tier terms change and can differ by account, so check the current AWS pricing and free tier pages before you plan around them.

Start by agreeing what good data means with the people who own and use it, and write those expectations down. Then place checks where data enters and changes: light structural checks on raw data, blocking rules on cleaned data, and reconciliation rules on the business tables people report from. Give every rule an owner who acts on failures. Fix problems at the source system where you can, rather than patching them in each pipeline.

The five most often cited are accuracy, completeness, consistency, timeliness and validity. Many frameworks add uniqueness as a sixth. In AWS Glue Data Quality, completeness, uniqueness, validity and timeliness map to rule types such as IsComplete, IsUnique, ColumnValues and DataFreshness, and consistency can be checked with referential integrity rules. Accuracy is the hardest to test with rules alone, because it usually needs a comparison with an outside source of truth.

## Frequently asked questions

### How does AWS Glue Data Quality work?

You write rules in the Data Quality Definition Language (DQDL), or start from rules the service recommends after profiling a table. The rules run either inside a Glue ETL job, where a failure can stop the job or send failing rows to quarantine, or against a table in the Glue catalogue on demand or on a schedule. Each run records which rules passed and failed, publishes metrics and events, and builds a history that dynamic rules and anomaly detection use to spot unusual changes over time.

### What exactly is AWS Glue?

AWS Glue is the serverless data integration service on AWS. It includes a central catalogue that records tables and schemas, crawlers that discover data in storage such as Amazon S3, and Spark-based jobs that extract, transform and load data. You do not manage servers. AWS Glue Data Quality is a capability inside the service that checks data against rules, either during Glue jobs or on tables in the catalogue.

### Is AWS Glue included in free tier?

The Glue catalogue has a free allowance for stored objects and requests, but Glue jobs, crawlers and data quality runs are charged as compute time. Recommendation runs, scheduled catalogue checks and anomaly detection all consume that compute, and in-pipeline checks add time to the job they sit in. Free tier terms change and can differ by account, so check the current AWS pricing and free tier pages before you plan around them.

### How to increase data quality?

Start by agreeing what good data means with the people who own and use it, and write those expectations down. Then place checks where data enters and changes: light structural checks on raw data, blocking rules on cleaned data, and reconciliation rules on the business tables people report from. Give every rule an owner who acts on failures. Fix problems at the source system where you can, rather than patching them in each pipeline.

### What are the 5 pillars of data quality?

The five most often cited are accuracy, completeness, consistency, timeliness and validity. Many frameworks add uniqueness as a sixth. In AWS Glue Data Quality, completeness, uniqueness, validity and timeliness map to rule types such as IsComplete, IsUnique, ColumnValues and DataFreshness, and consistency can be checked with referential integrity rules. Accuracy is the hardest to test with rules alone, because it usually needs a comparison with an outside source of truth.

---

Shipshape Data is a London AI consultancy: we build the data foundation your AI depends on, then the AI on top. Site guide for agents: https://shipshapedata.com/llms.txt | Contact: hello@shipshapedata.com
