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.
checkpoint = context.add_or_update_checkpoint(
name="my_checkpoint",
validations=[
{
"batch_request": batch_request,
"expectation_suite_name": "my_expectation_suite",
},
],
)
There are other configuration options for more advanced deployments. See How to configure a new Checkpoint using test_yaml_config.
Run your Checkpoint (Optional)
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:
context.build_data_docs()
Retrieve your Checkpoint (Optional)
Run the following Python code to retrieve the Checkpoint:
retrieved_checkpoint = context.get_checkpoint(name="my_checkpoint")