Skip to main content
Version: 0.18.21

RuntimeBatchRequest

class great_expectations.core.batch.RuntimeBatchRequest(datasource_name: str, data_connector_name: str, data_asset_name: str, runtime_parameters: dict, batch_identifiers: dict, batch_spec_passthrough: Optional[dict] = None)#

A RuntimeBatchRequest creates a Batch for a RuntimeDataConnector.

Instead of serving as a description of what data Great Expectations should fetch, a RuntimeBatchRequest serves as a wrapper for data that is passed in at runtime (as an in-memory dataframe, file/S3 path, or SQL query), with user-provided identifiers for uniquely identifying the data.

-Relevant Documentation Links -

runtime_parameters will vary depending on the Datasource used with the data.

For a dataframe:

{"batch_data": df}

For a path on a filesystem:

    {"path": "/path/to/data/file.csv"}

Parameters
  • datasource_name – name of the Datasource used to connect to the data

  • data_connector_name – name of the DataConnector used to connect to the data

  • data_asset_name – name of the DataAsset used to connect to the data

  • runtime_parameters – a dictionary containing the data to process, a path to the data, or a query, depending on the associated Datasource

  • batch_identifiers – a dictionary to serve as a persistent, unique identifier for the data included in the Batch

  • batch_spec_passthrough – a dictionary of additional parameters that the ExecutionEngine will use to obtain a specific set of data

Returns

BatchRequest

to_json_dict() dict[str, JSONValues]#

Returns a JSON-serializable dict representation of this BatchRequestBase.

Returns

A JSON-serializable dict representation of this BatchRequestBase.