Skip to main content
Version: 0.17.19

Validator

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

The Validator is the core functional component of Great Expectations. Validators don't require additional configuration. Provide one with an Expectation Suite and a Batch Request, and it will function.

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

When connecting to Data, it is often useful to verify that you have configured your Data SourceProvides a standard API for accessing and interacting with data from a wide variety of source systems. correctly. To verify a new Data Source, you can load data from it into a Validator using a Batch Request. Fore examples of this workflow, see Connect to source data.

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 DataAssistant or a Custom Profiler.

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.

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.

Create

You can create a Validator through the get_validator(...) command of a Data Context.

Configure

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.