tabsdata.S3Destination
- class S3Destination(
- uri: str | list[str],
- credentials: S3Credentials,
- format: str | FileFormat = None,
- region: str = None,
- catalog: AWSGlue = None,
Bases:
DestinationPluginS3-file-based data outputs.
- __init__(
- uri: str | list[str],
- credentials: S3Credentials,
- format: str | FileFormat = None,
- region: str = None,
- catalog: AWSGlue = None,
Initializes the S3Destination with the given URI and the credentials required to access the S3 bucket, and optionally a format and date and time after which the files were modified.
- Parameters:
uri – The URI of the files with format: ‘s3://path/to/files’. It can be a single URI or a list of URIs.
credentials – The credentials required to access the S3 bucket. Must be a S3Credentials object.
format – The format of the file. If not provided, it will be inferred from the file extension of the data. Can be either a string with the format or a FileFormat object. Currently supported formats are ‘csv’, ‘parquet’, ‘ndjson’ and ‘jsonl’.
region – The region where the S3 bucket is located. If not provided, the default AWS region will be used.
- Raises:
OutputConfigurationError –
FormatConfigurationError –
Methods
__init__(uri, credentials[, format, region, ...])Initializes the S3Destination with the given URI and the credentials required to access the S3 bucket, and optionally a format and date and time after which the files were modified.
chunk(working_dir, *results)Trigger the exporting of the data to local parquet chunks.
stream(working_dir, *results)Trigger the exporting of the data.
write(files)Given a file or a list of files, write to the desired destination.
Attributes
allow_fragmentsWhether to allow fragments in the output.
catalogThe catalog to store the data in.
credentialsThe credentials required to access the S3 bucket.
formatThe format of the file.
regionThe region where the S3 bucket is located.
uri's3://path/to/files'.