Skip to main content
Version: 1.0.2

TableAsset

class great_expectations.datasource.fluent.sql_datasource.TableAsset(*, name: str, type: typing.Literal['table'] = 'table', id: <pydantic.v1.fields.DeferredType object at 0x7fd9fa37c3a0> = None, order_by: <pydantic.v1.fields.DeferredType object at 0x7fd9fa37c490> = None, batch_metadata: <pydantic.v1.fields.DeferredType object at 0x7fd9fa37c5b0> = None, batch_definitions: <pydantic.v1.fields.DeferredType object at 0x7fd9fa37c730> = None, table_name: str = '', schema_name: typing.Optional[str] = None)#

add_batch_definition(name: str, partitioner: Optional[great_expectations.core.batch_definition.PartitionerT] = None) great_expectations.core.batch_definition.BatchDefinition#

Add a BatchDefinition to this DataAsset. BatchDefinition names must be unique within a DataAsset.

If the DataAsset is tied to a DataContext, the BatchDefinition will be persisted.

Parameters:
  • name (str) – Name of the new batch definition.

  • partitioner – Optional Partitioner to partition this BatchDefinition

Returns:

The new batch definition.

Return type:

BatchDefinition

add_batch_definition_daily(name: str, column: str, sort_ascending: bool = True) BatchDefinition#

add_batch_definition_monthly(name: str, column: str, sort_ascending: bool = True) BatchDefinition#

add_batch_definition_whole_table(name: str) BatchDefinition#

add_batch_definition_yearly(name: str, column: str, sort_ascending: bool = True) BatchDefinition#

delete_batch_definition(name: str) None#

Delete a batch definition.

Parameters:

name (str) – Name of the BatchDefinition to delete.