Skip to main content
Version: 0.16.16

Checkpoint

class great_expectations.checkpoint.Checkpoint(name: str, data_context: AbstractDataContext, config_version: Union[int, float] = 1.0, template_name: Optional[str] = None, run_name_template: Optional[str] = None, expectation_suite_name: Optional[str] = None, batch_request: Optional[Union[BatchRequestBase, FluentBatchRequest, dict]] = None, validator: Optional[Validator] = None, action_list: Optional[Sequence[ActionDict]] = None, evaluation_parameters: Optional[dict] = None, runtime_configuration: Optional[dict] = None, validations: Optional[List[dict]] = None, profilers: Optional[List[dict]] = None, ge_cloud_id: Optional[str] = None, expectation_suite_ge_cloud_id: Optional[str] = None, default_validation_id: Optional[str] = None)#

A checkpoint is the primary means for validating data in a production deployment of Great Expectations.

Checkpoints provide a convenient abstraction for bundling the Validation of a Batch (or Batches) of data against an Expectation Suite (or several), as well as the Actions that should be taken after the validation.

A Checkpoint uses a Validator to run one or more Expectation Suites against one or more Batches provided by one or more Batch Requests. Running a Checkpoint produces Validation Results and will result in optional Actions being performed if they are configured to do so.

Parameters
  • name – User-selected cCheckpoint name (e.g. “staging_tables”).

  • data_context – Data context that is associated with the current checkpoint.

  • config_version – Version number of the checkpoint configuration.

  • template_name – The name of another checkpoint to use as a base template.

  • run_name_template – A template to create run names, using environment variables and datetime-template syntax (e.g. “%Y-%M-staging-$MY_ENV_VAR”).

  • expectation_suite_name – Expectation suite associated with checkpoint.

  • batch_request – Batch request describing the batch of data to validate.

  • action_list – A list of actions to perform after each batch is validated.

  • evaluation_parameters – Evaluation parameters to use in generating this checkpoint.

  • runtime_configuration – Runtime configuration to pass into the validator’s runtime configuration (e.g. result_format).

  • validations – Validations to be executed as part of checkpoint.

  • profilers – Profilers to use in generating this checkpoint.

  • validation_operator_name

    List of validation Operators configured by the Checkpoint.

    Deprecated since version 0.14.0.

  • batches

    List of Batches for validation by Checkpoint.

    Deprecated since version 0.14.0.

  • ge_cloud_id

    Great Expectations Cloud id for this Checkpoint.

    New in version 0.13.33: Used in cloud deployments.

  • expectation_suite_ge_cloud_id

    Great Expectations Cloud id associated with Expectation Suite.

    New in version 0.13.33: Used in cloud deployments.

  • default_validation_id – Default value used by Checkpoint if no Validations are configured.

Raises
  • ValueError – If BatchRequest contains batch_data, since only primitive types are allowed in the constructor.

  • ValueError – If Validations contains batch_data, since only primitive types are allowed in the constructor.

run(template_name: Optional[str] = None, run_name_template: Optional[str] = None, expectation_suite_name: Optional[str] = None, batch_request: Optional[Union[BatchRequestBase, FluentBatchRequest, dict]] = None, validator: Optional[Validator] = None, action_list: Optional[Sequence[ActionDict]] = None, evaluation_parameters: Optional[dict] = None, runtime_configuration: Optional[dict] = None, validations: Optional[List[dict]] = None, profilers: Optional[List[dict]] = None, run_id: Optional[Union[str, RunIdentifier]] = None, run_name: Optional[str] = None, run_time: Optional[datetime.datetime] = None, result_format: Optional[Union[str, dict]] = None, expectation_suite_ge_cloud_id: Optional[str] = None) CheckpointResult#

Validate against current Checkpoint.

Arguments allow for override of the current Checkpoint configuration.

Parameters
  • template_name – The name of another checkpoint to use as a base template.

  • run_name_template – A template to create run names, using environment variables and datetime-template syntax (e.g. “%Y-%M-staging-$MY_ENV_VAR”).

  • expectation_suite_name – Expectation suite associated with checkpoint.

  • batch_request – Batch request describing the batch of data to validate.

  • validator – Validator objects, loaded with Batch data samples, can be supplied (in lieu of “batch_request”)

  • action_list – A list of actions to perform after each batch is validated.

  • evaluation_parameters – Evaluation parameters to use in generating this checkpoint.

  • runtime_configuration – Runtime configuration to pass into the validator’s runtime configuration (e.g. result_format).

  • validations – Validations to be executed as part of checkpoint.

  • profilers – Profilers to use in generating this checkpoint.

  • run_id – The run_id for the validation; if None, a default value will be used.

  • run_name – The run_name for the validation; if None, a default value will be used.

  • run_time – The date/time of the run.

  • result_format – One of several supported formatting directives for expectation validation results

  • expectation_suite_ge_cloud_id

    Great Expectations Cloud id for the expectation suite

    New in version 0.13.33: Used in cloud deployments.

Returns

CheckpointResult

Raises
  • InvalidCheckpointConfigError – If run_id is provided with run_name or run_time.

  • InvalidCheckpointConfigError – If result_format is not an expected type.

  • CheckpointError – If Checkpoint does not contain a batch_request or validations.