JDBC Driver for Google Cloud Storage

Build 22.0.8479

UploadObject

Uploads objects in a single operation. Use the SimpleUploadLimit connection property to adjust the threshold in bytes in order to perform a multipart upload.

Execute

The Driver Uses #TEMP tables as fields for aggregate information entered

You must include in your query :

INSERT INTO ObjectInformationAggregate#TEMP(LocalFilePath) VALUES ('C:/amazons3/test/testfile.txt')

Then you execute the procedure by specifying the value of ObjectInformationAggregate with the name of #TEMP table used ObjectInformationAggregate#TEMP.

EXEC UploadObject ObjectInformationAggregate = 'ObjectInformationAggregate#TEMP'

Note: When setting the GetSignedUrl input to true, you need to authenticate with a service account which has the storage.objects.get IAM role.

Input

Name Type Required Accepts Input Streams Description
Bucket String True False Bucket name where the object will be uploaded.
ContentStream String False True The content as InputStream to be uploaded when LocalFilePath or ObjectInformationAggregate is not specified.
ObjectName String False False The name of the uploaded object. It should be specified only when uploading the content as InputStream.
FolderPath String False False The path to the folder that will receive the data of the object.
LocalFilePath String False False The path to the file that will be uploaded in the bucket. If this is a path to a folder, then all the files in the folder will be uploaded in the bucket.
ObjectInformationAggregate String False False An aggregate representing the object information. Can be in the form of XML, JSON or a #TEMP table.
GetSignedUrl Boolean False False Whether to return a signedURL. Only available when OAuthJWTCert is set.

デフォルト値はfalseです。

ExpiresIn String False False The expiration time for the SignedURL it should be in the format: 1d2h3m4s, the maximum value is 7d0h0m0s

Result Set Columns

Name Type Description
Object String Object name for the object that is uploaded.
Success String Indicator if the stored procedure was successful or not.
SignedURL String Returns a signedUrl which can be used to download the resource.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479