Clustering in BigQuery

Last updated on May 30, 2023

Hevo allows you to create clustered tables in your BigQuery Destination. Clustering helps you narrow down the searches, thereby enhancing the performance of your queries. For example, queries that use filter clauses, or aggregate data. To organize the data into clusters, you must identify the Source fields to be used as cluster keys.

You can specify up to four cluster keys. When you create a clustered table using multiple Source fields, the order in which you specify those fields determines the sorting order of the data in your table.

Select cluster key

Enabling Clustering in Hevo

Clustering cannot be enabled on an existing table. Therefore, you need to manually create a new table and define the cluster keys. For this, you must disable Auto Mapping.

Note: If you had previously enabled Auto Mapping and now disable it, the existing mapping is not affected and the Event Type still carries the status MAPPED. You must specifically edit the mapping to apply any changes.

Once cluster keys are defined for a table, you cannot change these. If you want to use a different set of Source fields as cluster keys, you must create a new table.

Note: You can select the same Source field as the cluster key and primary key.

If the cluster key is deleted in the Source or skipped in the Schema Mapper, the clustered table reflects the field values as NULL.

Destination Considerations

  • BigQuery does not support clustering on Array and Struct data types.

Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Apr-06-2021 1.60 New document.

Tell us what went wrong