Google Cloud Storage (GCS) is a storage platform that is fast, cost-effective, secure, and used for storing unstructured data (objects) in any file format in a bucket. You can use this data for multiple processes, such as creating a BigQuery data warehouse, and running analytical processes. Hevo supports replication of data from your GCS bucket in the following file formats: AVRO, CSV, JSON, and XML.
As of Release 1.66, Hevo adds the __hevo_source_modified_at
field to the Destination as a metadata field. For existing Pipelines that have this field:
-
If this field is displayed in the Schema Mapper, you must ignore it and not try to map it to a Destination table column, else the Pipeline displays an error.
-
Hevo automatically loads the information for the __hevo_source_modified_at
column, which is already present in the Destination table.
You can, however, continue to use __hevo_source_modified_at
to create transformations using the function event.getSourceModifiedAt()
. Read Metadata Column __hevo_source_modified_at
.
Prerequisites
Obtaining the GCS Bucket Name and Folder Path
To obtain the GCS bucket name and folder path:
-
Log in to your Google Cloud console.
-
In the top navigation bar, click the Select a project button.
-
In the Select a Resource window, search and select the project which contains your storage bucket. For example, Hevo Doc.
-
In the left navigation menu, hover over Cloud Storage and click Buckets.
-
On the Buckets page, copy the name of the bucket from which you want to ingest data. For example, hevo-sales-bucket as shown in the image below.
-
(Optional) Obtain the path to a specific folder or subfolder within a bucket if you want to ingest data only from that folder. To do so:
-
Click the bucket which contains the folder or subfolder. For example, hevo-sales-bucket.
-
On the Bucket details page, click the folder or subfolder from which you want to ingest data, and click the Copy icon to copy its path.
Use these details while creating your Hevo Pipeline.
Configuring Google Cloud Storage as a Source
To configure Google Cloud Storage as a Source in Hevo:
-
Click PIPELINES in the Navigation Bar.
-
Click + CREATE PIPELINE in the Pipelines List View.
-
On the Select Source Type page, select GCS.
-
On the Configure your GCS account page, select the authentication method for connecting to your GCS Source:
-
To connect with a User Account, do one of the following:
-
To connect with a Service Account, do one of the following:
Note: The service account must be granted the Storage Object Viewer role on the bucket from which you want to ingest data.
-
Select a previously configured account and click CONTINUE.
-
Click the attach () icon to upload the Service Account Key and click CONFIGURE GCS ACCOUNT.
Note: Hevo supports only JSON format for the service account key file.
-
On the Configure your GCS Source page, specify the following:
-
Pipeline Name: A unique name for your Pipeline, not exceeding 255 characters.
-
Bucket Name: The name of the bucket from which you want to ingest data.
-
Path Prefix: The prefix of the path for the directory that contains your data. By default, Hevo ingests data from the root of the bucket. To ingest data only from a specific folder or subfolder within the bucket, specify the folder path that you obtained from your Google Cloud console in the following format: <folder name>/<subfolder name>/.
For example, if the path you obtained is hevo-sales-bucket/HevoSalesData/SalesReports, then specify HevoSalesData/SalesReports/.
-
File Format: The format of the data file in the Source. Hevo supports the AVRO, CSV, JSON, and XML file formats to ingest data.
Note: You can select only one file format at a time. If your Source data is in a different format, you can export the data to either of the supported formats, and then ingest the files.
Based on the format you select, you must specify some additional settings:
-
Include compressed files: Enable this option if you want to ingest compressed files of the selected file format from the folders. Hevo currently supports the tar.gz and zip compression types only. Hevo automatically unzips these compressed files on ingestion. Further, Hevo re-ingests these files if they are updated in your GCS account, as it is not possible to identify individual changes.
-
Convert date/time format fields to timestamp: Enable this option if you want to convert the date/time format within the files of selected folders to timestamp. For example, the date/time format 07/11/2022, 12:39:23 is converted to timestamp, 1667804963.
-
Click TEST & CONTINUE.
-
Proceed to configuring the data ingestion and setting up the Destination.
Data Replication
For Teams Created |
Default Ingestion Frequency |
Minimum Ingestion Frequency |
Maximum Ingestion Frequency |
Custom Frequency Range (in Hrs) |
Before Release 2.21 |
5 Mins |
5 Mins |
3 Hrs |
1-3 |
After Release 2.21 |
6 Hrs |
30 Mins |
24 Hrs |
1-24 |
Note: The custom frequency must be set in hours as an integer value. For example, 1, 2, or 3 but not 1.5 or 1.75.
Read the detailed Hevo documentation for the following related topics:
Example: Automatic Column Header Creation for CSV Tables
Consider the following data in CSV format, which has no column headers.
CLAY COUNTY,32003,11973623
CLAY COUNTY,32003,46448094
CLAY COUNTY,32003,55206893
CLAY COUNTY,32003,15333743
SUWANNEE COUNTY,32060,85751490
SUWANNEE COUNTY,32062,50972562
ST JOHNS COUNTY,846636,32033,
NASSAU COUNTY,32025,88310177
NASSAU COUNTY,32041,34865452
If you disable the Treat first row as column headers option, Hevo auto-generates the column headers, as seen in the schema map below:
The record in the Destination appears as follows:
Limitations
-
Hevo does not consider the character used as a delimiter in CSV files as data. This is true even if you place an escape character (“\”) before the delimiter.
For example, suppose the delimiter for your CSV file is a “;”, and the data record in your GCS Source is “A\;B”. Hevo ingests this data as two separate fields, as it does not identify the semicolon as a part of the data.
See Also
Revision History
Refer to the following table for the list of key updates made to this page:
Date |
Release |
Description of Change |
May-27-2024 |
2.23.4 |
Added information about connecting to GCS with service accounts in the Configuring Google Cloud Storage as a Source section. |
Mar-05-2024 |
2.21 |
Updated the ingestion frequency table in the Data Replication section. |
Oct-30-2023 |
NA |
Added section, Obtaining the GCS Bucket Name and Folder Path. |
Jul-25-2023 |
NA |
Added limitation about Hevo not handling escape characters in CSV files. |
Jan-10-2023 |
NA |
Updated the page for consistent information structure. |
Dec-20-2022 |
NA |
Added section, Limitations. |
Nov-08-2022 |
NA |
Updated section, Configuring Google Cloud Storage as a Source to add information about the Convert date/time format fields to timestamp option. |
Sep-21-2022 |
NA |
Added a note in section, Configuring Google Cloud Storage as a Source. |
Mar-21-2022 |
1.85 |
Removed section, Limitations as Hevo now supports UTF-16 encoding format for CSV files. |
Oct-25-2021 |
NA |
Added section, Data Replication. |
Jun-28-2021 |
1.66 |
Updated the page overview with information about __hevo_source_modified_at being uploaded as a metadata field from Release 1.66 onwards. |
Feb-22-2021 |
NA |
Added the limitation about Hevo not supporting UTF-16 encoding format for CSV data. |