tabsdata.GCSDestination
- class GCSDestination( )
Bases:
DestinationPluginGCS-file-based data outputs.
- __init__( )
Initializes the GCSDestination with the given URI and the credentials required to access GCS; and optionally a format.
- Parameters:
uri – The URI of the files to export with format: ‘gs://path/to/files’. It can be a single URI or a list of URIs.
credentials – The credentials required to access GCS. Must be a GCPCredentials object.
format – The format of the file. If not provided, it will be inferred from the file extension. Can be either a string with the format or a FileFormat object. Currently supported formats are ‘csv’, ‘parquet’, ‘ndjson’ and ‘jsonl’.
- Raises:
OutputConfigurationError –
FormatConfigurationError –
Methods
__init__(uri, credentials[, format])Initializes the GCSDestination with the given URI and the credentials required to access GCS; and optionally a format.
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.
credentialsThe credentials required to access GCS.
formatThe format of the file.
uri'gs://path/to/files'.