NewUploader
No overview available.
def NewUploader(
_: context.Context,
store: *storage.DataStore,
format: core.DataLoadingConfig_LiteralMapFormat,
mode: core.IOStrategy_UploadMode,
errorFileName: string
) - > Uploader
Creates and returns a new Uploader instance, configured with the specified data format, storage, upload mode, and error file name. This function initializes the necessary components for handling data uploads according to the provided settings.
Parameters
| Name | Type | Description |
|---|---|---|
| _ | context.Context | The context for the operation, typically used for cancellation or deadlines. It is currently unused in the function's implementation. |
| store | *storage.DataStore | The data store where the uploaded data will be persisted. This defines the storage backend for the uploader. |
| format | core.DataLoadingConfig_LiteralMapFormat | The format of the data to be uploaded, such as CSV, JSON, or XML. This dictates how the uploader will parse the incoming data. |
| mode | core.IOStrategy_UploadMode | The upload mode, specifying how the data should be handled during the upload process (e.g., overwrite, append, upsert). This controls the uploader's behavior when encountering existing data. |
| errorFileName | string | The name of the file where any errors encountered during the upload process will be logged or stored. This helps in debugging and monitoring upload failures. |
Returns
| Type | Description |
|---|---|
Uploader | A new Uploader instance configured with the provided parameters. |