Upload to GCS from variable
This BLOCK uploads the contents of a variable as a file to GCS.
It converts the contents of the variable according to its file format property. The six available formats are as follows:
Writes the contents of the variable as is to the file. The variable must contain a STRING, otherwise the BLOCK will fail.
Converts the contents of the variable to YAML and writes it to the file.
Converts the contents of the variable to JSON and writes it to the file.
Converts the contents of the file to CSV and writes it to the file.
The following example shows how to use the Construct object BLOCK to prepare an array of objects.
(Click image to enlarge)
Processing the Upload to GCS from variable BLOCK with a variable containing this data will write the following CSV file to GCS (Note: the input variable property would be set to
Col1,Col2,Col3 abc,123,1.23 xyz,456,4.56
|Newline delimited JSON||
Converts the contents of the variable to newline delimited JSON and writes it to the file.
Assuming the variable contains a Base64 encoded string, the decoded string will be written to the file. The variable must contain string data, otherwise the BLOCK will fail.
Configure the name displayed on this BLOCK.
|GCP service account||
Select the GCP service account to use with this BLOCK.
|Destination GCS URL||
Designate the GCS URL that the file will be uploaded to (Example: gs://magellan-sample/sample.yaml).
Designate the format of the file that will be uploaded. The contents of the variable will be converted according to this setting to create the file.
Refer to the explanation in the Overview section for more details on each file format.
Make notes about this BLOCK.
Designate the variable whose contents will be uploaded as a file to GCS.