Skip to main content
Version: 0.14.13

Validator

SetupArrowConnect to DataArrowCreate ExpectationsArrowValidate Data

Overview

Definition

A Validator is the object responsible for running an Expectation SuiteA collection of verifiable assertions about data. against data.

Features and promises

The Validator is the core functional component of Great Expectations.

Relationship to other objects

Validators are responsible for running an Expectation Suite against a Batch RequestProvided to a Datasource in order to create a Batch.. CheckpointsThe primary means for validating data in a production deployment of Great Expectations., in particular, use them for this purpose. However, you can also use your Data ContextThe primary entry point for a Great Expectations deployment, with configurations and methods for all supporting components. to get a Validator to use outside a Checkpoint.

Use cases

Setup

Connect to Data

When connecting to Data, it is often useful to verify that you have configured your DatasourceProvides a standard API for accessing and interacting with data from a wide variety of source systems. correctly. To verify a new Datasource, you can load data from it into a Validator using a Batch Request. There are examples of this workflow at the end of most of our guides on how to connect to specific source data systems.

Setup

Create Expectations

When creating Expectations for an Expectation Suite, most workflows will have you use a Validator. You can see this in our guide on how to create and edit Expectations with a Profiler, and in the Jupyter Notebook opened if you follow our guide on how to create and edit Expectations with instant feedback from a sample Batch of data.

Setup

Validate Data

Checkpoints utilize a Validator when running an Expectation Suite against a Batch Request. This process is entirely handled for you by the Checkpoint; you will not need to create or configure the Validator in question.

Features

Out of the box functionality

Validators don't require additional configuration. Provide one with an Expectation Suite and a Batch Request, and it will work out of the box.

API basics

How to access

Validators are not typically saved. Instead, they are instantiated when needed. If you need a Validator outside a Checkpoint (for example, to create Expectations interactively in a Jupyter Notebook) you will use one that is created for that purpose.

How to create

You can create a Validator through the get_validator(...) command of a Data Context. For an example of this, you can reference the "Instantiate your Validator" section of our guide on how to create and edit Expectations with a Profiler

Configuration

Creating a Validator with the get_validator(...) method will require you to provide an Expectation Suite and a Batch Request. Other than these parameters, there is no configuration needed for Validators.