Skip to main content
Version: 0.18.9

Create a new Checkpoint

This guide will help you create a new CheckpointThe primary means for validating data in a production deployment of Great Expectations., which allows you to couple an Expectation SuiteA collection of verifiable assertions about data. with a data set to ValidateThe act of applying an Expectation Suite to a Batch..

Prerequisites

Create a Checkpoint

To modify the following code for your use case, replace batch_request and expectation_suite_name with your own paremeters.

Python
checkpoint = context.add_or_update_checkpoint(
name="my_checkpoint",
validations=[
{
"batch_request": batch_request,
"expectation_suite_name": "my_expectation_suite",
},
],
)

For other Checkpoint configuration options, see Manage Checkpoints.

Run your Checkpoint (Optional)

Python
checkpoint_result = checkpoint.run()

The returned checkpoint_result contains information about the checkpoint run.

Build Data Docs (Optional)

Run the following Python code to build Data DocsHuman readable documentation generated from Great Expectations metadata detailing Expectations, Validation Results, etc. with the latest checkpoint run results:

Python
context.build_data_docs()

Retrieve your Checkpoint (Optional)

Run the following Python code to retrieve the Checkpoint:

Python
retrieved_checkpoint = context.get_checkpoint(name="my_checkpoint")