Skip to main content

How to validate data by running a Checkpoint

This guide will help you validate your data by running a Checkpoint.

As stated in the Getting Started Tutorial Validate your data using a Checkpoint, the best way to validate data in production with Great Expectations is using a Checkpoint. The advantage of using a Checkpoint is ease of use, due to its principal capability of combining the existing configuration in order to set up and perform the validation:

Otherwise, configuring these validation parameters would have to be done via the API. A Checkpoint encapsulates this "boilerplate" and ensures that all components work in harmony together. Finally, running a configured Checkpoint is a one-liner, as described below.

Prerequisites: This how-to guide assumes you have:

You can run the Checkpoint from the CLI in a Terminal shell or using Python.


  1. Checkpoints can be run like applications from the command line by running:
great_expectations --v3-api checkpoint run my_checkpointValidation failed!
  1. Next, observe the output which will tell you if all validations passed or failed.

Additional notes#

This command will return posix status codes and print messages as follows:

+-------------------------------+-----------------+-----------------------+| **Situation**                 | **Return code** | **Message**           |+-------------------------------+-----------------+-----------------------+| all validations passed        | 0               | Validation succeeded! |+-------------------------------+-----------------+-----------------------+| one or more validation failed | 1               | Validation failed!    |+-------------------------------+-----------------+-----------------------+