FileDataAsset
Base class for PathDataAssets which batch by applying a regex to file names.
Add a BatchDefinition which defines daily batches by file name.
Parameters
Name Description name
BatchDefinition name
Raises
Type Description RegexMissingRequiredGroupsError
regex is missing the groups year, month, and/or day.
Add a BatchDefinition which defines monthly batches by file name.
Parameters
Name Description name
BatchDefinition name
Raises
Type Description RegexMissingRequiredGroupsError
regex is missing the groups year and/or month.
Add a BatchDefinition which matches a single Path.
Parameters
Name Description name
BatchDefinition name
Raises
Type Description PathNotFoundError
path cannot be resolved
Add a BatchDefinition which defines yearly batches by file name.
Parameters
Name Description name
BatchDefinition name
Raises
Type Description RegexMissingRequiredGroupsError
regex is missing the group year
Delete a batch definition.
Parameters
Name Description name (str)
Name of the BatchDefinition to delete.
Get a batch definition.
Parameters
Name Description name (str)
Name of the BatchDefinition to get.
Raises
Type Description KeyError
If the BatchDefinition does not exist.
class great_expectations.datasource.fluent.data_asset.path.file_asset.FileDataAsset(*, name: <pydantic.v1.fields.DeferredType object at 0x7f2059489bb0>, type: <pydantic.v1.fields.DeferredType object at 0x7f2059489c70>, id: <pydantic.v1.fields.DeferredType object at 0x7f2059489d30> = None, order_by: <pydantic.v1.fields.DeferredType object at 0x7f2059489e20> = None, batch_metadata: <pydantic.v1.fields.DeferredType object at 0x7f2059489fa0> = None, batch_definitions: <pydantic.v1.fields.DeferredType object at 0x7f205948a150> = None, connect_options: <pydantic.v1.fields.DeferredType object at 0x7f205948a210> = None, **extra_data: typing.Any)
Methods
add_batch_definition_daily(name: str, regex: Union[re.Pattern, str], sort_ascending: bool = True) → BatchDefinition
add_batch_definition_monthly(name: str, regex: Union[re.Pattern, str], sort_ascending: bool = True) → BatchDefinition
add_batch_definition_path(name: str, path: PathStr) → BatchDefinition
add_batch_definition_yearly(name: str, regex: Union[re.Pattern, str], sort_ascending: bool = True) → BatchDefinition
delete_batch_definition(name: str) → None
get_batch_definition(name: str) → great_expectations.core.batch_definition.BatchDefinition