Search

Home

Home

INPUT GOOGLE

INPUT GOOGLE

The INPUT GOOGLE operator allows you to download files and Google Sheets definitions from Google Drive linked to an authenticated user account.

  • At the operator input, you specify a data file or a directory containing the files to be downloaded.
  • At the output, the operator generates a data bus containing a stream of records.
  • The structure of the output data bus depends on the type of file retrieved, allowing flexible processing of different data formats.

The INPUT GOOGLE operator is useful in processes where data is shared or distributed via the Google Workspace platform and needs to be automatically and periodically loaded into the GRAVITY system.

SELECTING AND CREATING A GOOGLE CONNECTION

To connect to a selected Google account, you have to choose the desired Google connection. Go to the first tab in the operator properties, Google account connection.

image

In the Connection field, select one of the predefined connections. If no connection has been defined yet, or if you want to add a new one, you can use the Add button to create it.

image
icon
See how to configure a Google connection.

SUPPORTED FILE TYPES

The operator can download files from Google Drive that are binary or text files (without interpreting their content), or spreadsheet files, which are processed with content interpretation and data bus creation based on the file data.

image

Depending on the selected file type, the Google Drive file browser available under the Select a source from google button in the Google file tab only displays files of that type.

image
  • For the Spreadsheet type, the browser displays only Google Spreadsheet files, and only this file type can be selected.
  • For the Binary file type, the browser displays only files containing binary data.
  • For the Text file type, the browser displays only files containing text data.

For the Binary file and Text file types, it is possible to select an entire folder. In this case, during processing, the operator will retrieve all binary or text files from that folder.

After selecting a file or folder, the File name, FileId and Mimetype fields are filled in according to the selection.

image
icon
When downloading files or folders from Google Drive, the system identifies them based on the FileId field. This is a unique resource identifier that allows distinguishing between items with the same name located in different folders.

GOOGLE SPREADSHEET FILE TYPE

After selecting a Google Spreadsheet file in the Google file browser, you will find in the File information tab the details needed to decode the data from the sheet. Since a sheet has a structure similar to an Excel file, you have to specify how the data is arranged within the sheet.

The following fields allow you to define the structure of the data in the sheet:

  • Sheet name → specifies which sheet to retrieve data from
  • Caption included → indicates whether the data contains headers
  • in row → specifies the row in which the headers are located
  • Skip first → specifies how many rows to skip
image

After defining the sheet structure, you can click the Test button to verify the data retrieved from the sheet.

image

In the Columns tab, you have to generate the bits for the data bus output from the operator. To do this, use the Autogenerate columns button.

image

The system automatically assigns names to the data bus bits and determines their data types based on the information from the processed sheet. If you want to change a name or data type, click the corresponding field and enter a new name or select the appropriate type.

icon
The Refresh with additional and missing columns button keeps the previously generated columns unchanged unless a column has been removed from the data, and adds any new columns resulting from the modified data (applicable to the Google Spreadsheet file type).

BINARY FILE AND TEXT FILE TYPES

After selecting a file or folder, the File information tab displays the operation mode (Single file or All file in the dictionary). The tab also contains a Test button, which allows you to download the files and view the retrieved metadata.

image

By clicking the Test button, you can check the downloaded data.

image

In the Columns tab, you have to generate the bits for the data bus output from the operator. To do this, use the Autogenerate columns button.

image

For both the Binary file and Text file types, the same column bits are generated. The exception is the last field, which stores the file data. For the Binary file type, this field is called data and stores binary data, which is displayed on the data bus in debug mode as base64-encoded data. For the Text file type, the field is called textData and stores text data.