Skip to main content
Version: 1.3.12

BatchDefinition

Signature

class great_expectations.core.batch_definition.BatchDefinition(
*,
id: Optional[str] = None,
name: str,
partitioner: Optional[great_expectations.core.batch_definition.PartitionerT] = None
)

Configuration for a batch of data.

References the DataAsset to be used, and any additional parameters needed to fetch the data.

Properties

NameDescriptionReference

data_asset

The parent DataAsset for this Batch Definition.

DataAsset

Methods

get_batch

Signature

get_batch(
batch_parameters: Optional[BatchParameters] = None
) → Batch

Retrieves a batch from the underlying asset. Defaults to the last batch from the asset's batch list.

Parameters

NameDescription

batch_parameters

Additional parameters to be used in fetching the batch.

Returns

TypeDescription

Batch

A Batch of data.

get_batch_identifiers_list

Signature

get_batch_identifiers_list(
batch_parameters: Optional[BatchParameters] = None
) → List[Dict]

Retrieves a list of available batch identifiers. These identifiers can be used to fetch specific batches via batch_options.

Parameters

NameDescription

batch_parameters

Additional parameters to be used in fetching the batch identifiers list.

Returns

TypeDescription

List[Dict]

A list of batch identifiers.

save

Signature

save()None

Save the batch definition to the underlying data context.