Articles in this section

Import files to Google Cloud Storage

This article describes how to import files and records to Google Cloud Storage (GCS).

Create a Google Cloud Storage import

Start creating an import to Google Cloud Storage in either of the following ways:

  • From the Build menu, select Flows > Create flow. Then, click Add destination/lookup.

  • From the Resources menu, select Imports. Then, click + Create import.

From the Application drop-down list, select Google Cloud Storage and your available Google Cloud Storage connection.

When prompted, select the type of import you want to create:

Transfer files into Google Cloud Storage

General

Name (required): Provide a clear and distinguishable name. You will have the option to choose this import throughout integrator.io, and a unique identifier will prove helpful later when selecting among a list of imports that you've created.

Description (optional): Describe your import so that you and others can quickly understand its purpose. Be sure to highlight any nuances that a user should be aware of before using this import in a flow. As you make changes to the resource, be sure to keep this description up to date.

Connection (required): The Google Cloud Storage connection to use for your import.

One to many: Set to Yes (advanced) to send each record to multiple destinations. Defaults to No.

Generate files from record: Choose Yes to build a new file (CSV, JSON, XML, and so on) from record data. Choose No to transfer raw files as-is (PDF, images, and so forth).

How would you like to generate files?

File type (required): Select the type of file that you want to generate. For example, choose CSV if you are importing a flat, delimited text file, or XLSX for a binary Microsoft Excel file. The file name you specify can include a file extension, but it does not affect this setting. You can then choose a sample file to define the record structure. For example, if you are importing CSV files (i.e. files containing Comma Separated Value data), choose CSV. Each file type includes additional settings to customize your import. Acceptable file types include:

  • CSV (or any delimited text file)

  • EDI X12 

  • EDIFACT 

  • Fixed width 

  • JSON 

  • XLSX 

  • XML 

Based on the file type, the settings you see will differ. See the settings in a file type from the grouped sections below.

Where would you like files transferred?

Bucket name (required): Enter the name of the Google Cloud Storage bucket where you want to upload files. You can also select a bucket from the drop-down list, which is populated from your connection's project. If the list cannot be retrieved, type the bucket name directly. You can use handlebars syntax to set the bucket name dynamically.

File name (required): Enter the full object name (path) for the uploaded file, including any folder path — for example, raw_json/orders_{{timestamp}}.json. You can use handlebars syntax to generate dynamic file names.

Tip

You can type '{{{' to use handlebars to include a predefined timestamp or random unique file identifier (UUID) in your file name.

Timestamp handlebar example: If you type FileXYZ-{{{timestamp "YY-MM-DD" "America/Los_Angeles"}}}.txt , the files will be named with the pattern: FileXYZ-16-06-30.txt.

Verify that your timestamp format is filesystem compatible. Incompatible ASCII characters include:

  • < (less than)

  • > (greater than)

  • : (colon)

  • " (double quote)

  • / (forward slash)

  • \ (backslash)

  • | (vertical bar or pipe)

  • ? (question mark)

  • * (asterisk)

Random handlebar example: If you type FileXYZ-{{{random "UUID"}}}.txt , the file will be named with the following pattern: FileXYZ-69368e91d9a440f79165b73afd46859d.txt generating a unique ID (UUID) of the file. The length of the UUID defaults to 32 if left unspecified, so typing FileXYZ-{{{random "UUID" 16}}}.txt would limit the UUID to 16 characters.

You can also include whatever file extension you like, and the file extension will never change the type of data generated.

Name collision handling: Defaults to Overwrite existing file. GCS does not support duplicate file names within the same bucket and path, so overwrite is the only available mode. To ensure each upload is unique, add a dynamic value such as {{timestamp}} to your File name.

Advanced

Setting

Description

Compress files

Compresses your import data as a .zip file before uploading to GCS.

Encrypt files

Use this cryptographic system to encrypt generated files before uploading. This option is enabled only when your connection is configured with at least one PGP cryptographic system.

File encoding

Select the character encoding for generated files. Defaults to UTF-8. Other supported values include Windows-1252 and UTF-16LE.

Mime type

Select the MIME type for the uploaded file. Defaults to Do not override, which causes integrator.io to send the MIME type matching the selected File type automatically — for example, JSON files are uploaded as application/json and CSV files as text/csv. If no file type is selected, GCS uses application/octet-stream. Select a specific MIME type or enter a custom value only if you need to override this behavior. Supports handlebars syntax for dynamic values.

Custom metadata

Add name/value pairs to attach as custom metadata to the uploaded GCS object. Each pair is stored as an x-goog-meta-* header on the object and can be used for downstream categorization, compliance tagging, or lifecycle policies. You can use handlebars syntax in the value field to reference dynamic data — for example, name Environment, value {{{environment}}}. Handlebars is supported on values only, not on names.

Blob key path

Enter the path to the blob key in the record payload when transferring raw files without file generation.

Import records into Google Cloud Storage

General

Name (required): Provide a clear and distinguishable name.

Description (optional): Describe your import so that you and others can quickly understand its purpose.

Connection (required): The Google Cloud Storage connection to use for your import.

What would you like to import?

Resource (required): Select the GCS resource to act on. The only accepted value at launch is Objects.

API endpoint (required): Select the operation to perform. Available endpoints for Objects:

  • Delete object — deletes a single object from a bucket. Requires Bucket and Object name. Both fields support handlebars syntax.

  • Copy object — copies an object to a new location. Requires Source bucket, Source object name, Destination bucket, and Destination object name. Leave Destination bucket blank to copy within the source bucket. All fields support handlebars syntax.

Save your import

  • Click Save to save your current settings.

  • Click Save & close to save your changes and exit the page.

  • Click Close to exit without saving.