Uploads files to a server using the Google Cloud Storage protocol.
The Google Cloud Storage nodes enable you to access data from Google Cloud Storage buckets, so that you can integrate your data flows with Google. See:
Uploading a single file to Google Cloud Storage
- In the Bucket property, specify the name of the Google Cloud Storage bucket to which you want to upload your file.
- In the FileName property, specify the location of the file to upload to Google Cloud Storage.
Uploading multiple files to Google Cloud Storage
- Drag a Directory List node onto the canvas and connect it to a Google Cloud Storage Put node. Run the Directory List node to generate a list of files in a given location.
- On the Google Cloud Storage Put node, in the Bucket property specify the name of the Google Cloud Storage bucket.
- Select the (from Field) variant of the FileName property, then specify the name of the input field that references the location of the files to upload.
Example
You have four files on your local desktop that you want to upload to Google Cloud Storage.
- Drag a Directory List node onto the canvas and in the DirectoryName property type the location of the folder that contains the four files, e.g.
C:\Users\<username>\Documents\Google Cloud Storage upload
. - You want to upload all files in the folder, so in the Pattern property type:
*.*
- Run the Directory List node, then connect it to a Google Cloud Storage Put node.
The output of the Directory List node is as follows:
FileName
unicode
File
unicode
Size
long
Created
datetime
Modified
datetime
C:\Users\<username>\Documents\Google Cloud Storage upload\create4.txt create4.txt 25 2017-10-27T06:50:43-0400 2017-10-27T06:50:43-0400 C:\Users\<username>\Documents\Google Cloud Storage upload\create3.txt create3.txt 25 2017-10-27T06:50:43-0400 2017-10-27T06:50:43-0400 C:\Users\<username>\Documents\Google Cloud Storage upload\create2.txt create2.txt 25 2017-10-27T06:50:43-0400 2017-10-27T06:50:43-0400 C:\Users\<username>\Documents\Google Cloud Storage upload\create1.txt create1.txt 25 2017-10-27T06:50:43-0400 2017-10-27T06:50:43-0400 - On the Google Cloud Storage Put node, in the Bucket property, type the name of the Google Cloud Storage bucket that you want to upload your files to, e.g.
my-example-bucket
- Select the (from Field) variant of the Object property and type the name of the input field containing the files that you want to upload, in this case
File
. - Select the (fromField) variant of the FileName property and type the name of the input field containing the location of the files that you want to upload, in this case
FileName
. - Run the Google Cloud Storage Put node to upload your files.
Properties
Bucket
Specify the name of the Google Cloud Storage Bucket.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
A value is required for this property.
Object
Optionally specify the name of the Google Cloud Storage Object.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
The default value is the base name of the file.
Credentials
Optionally specify the file containing the Google Cloud Storage credentials.
If the Credentials are not set then the Google Cloud Storage default strategy will be used.
FileName
Specify the location of the file to upload to Google Cloud Storage.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
A value is required for this property.
FailureBehavior
Optionally specify what to do when a file fails to upload. Choose from:
- Error - Report error and stop further processing.
- Log - Log a warning message and skip the file.
- Ignore - Skip the file.
The default value is Log.
Inputs and outputs
Inputs: 1 optional.
Outputs: uploaded files, errors.