Working with a BigQuery Warehouse Connection
This documentation is for Kyvos 2026.8.x. To view documentation for other Kyvos versions, click here. |
|---|
1. Overview
Kyvos supports both relational and hybrid multidimensional models on BigQuery connections. You can use this connection for querying data from your BigQuery data warehouse.
2. Prerequisites
2.1 Supported and unsupported datatypes in BigQuery
Supported datatypes | Unsupported datatypes |
|---|---|
Array | Struct |
Long | Range |
Datetime, Date | Range |
Numeric | Geography (works when do explicit cast on dataset SQL) |
String | Boolean (works when do explicit cast on dataset SQL) |
Json | Interval (works when do explicit cast on dataset SQL) |
Interval | Json (works when do explicit cast on dataset SQL) |
Double | Timestamp (works when do explicit cast on dataset SQL) |
Decimal | Bytes (works when do explicit cast on dataset SQL) |
On this page:
- 1 1. Overview
- 2 2. Prerequisites
- 3 3. Setting up BigQuery warehouse connection
2.2 Column-Level Security (CLS)
Kyvos supports Column Level Security defined in BigQuery. When you create a semantic model with BigQuery as the data source, any column-level security applied in BigQuery is reflected in Kyvos when data is accessed from the semantic model.
The user's email ID in Kyvos must match their email ID in Google Cloud.
The user must have the Fine-Grained Reader role to access secured columns in both Kyvos and BigQuery.
Required service account permissions
To read CLS columns when accessing data from the semantic model, grant the following permissions to the connection's service account so that Kyvos can successfully call GCP APIs:
Permission | Area |
|---|---|
| BigQuery table metadata |
| Cloud Asset / IAM analysis |
| Cloud Asset / IAM search |
| Cloud Asset resource search |
| Data Catalog policy tags |
| Service usage |
| IAM role details |
2.3 Connections
Multiple connections: You can create multiple BigQuery connections for raw data querying. These appear on the Dataset Designer page, where you can select the connection to use for a particular semantic model.
Cross-cloud reads: You can connect to your BigQuery data warehouse to read data from both GCP and EMR-based AWS clusters.
Note
When creating datasets from warehouses in different projects, ensure that all Materialization Datasets specified in the connection configuration belong to the same region.
2.4 Configuration and Compatibility
Date filters with type casting: If you filter a date column using
>=or<=with an explicit type cast, add the propertykyvos.rf.sqlparser.enabledand set it totrueon the Hadoop connection.Function mapping: All Spark-supported functions must be mapped to their supported BigQuery equivalents. Update your SQL and datasets accordingly; otherwise, incompatible functions will fail.
2.5 BigQuery and Kyvos VM Setup
2.5.1 Required Roles Based on Authentication Type
Based on the selected authentication type, grant the roles and permissions described in section 2.5 to the appropriate service account on the BigQuery project.
Authentication Type | Service Account to Which Roles Must Be Granted |
|---|---|
Application Default Credentials | Same service account that is being used by Kyvos VMs. |
Google Service Account | Service account used while creating BigQuery connection. |
2.5.2 Required Roles at Project and Dataset Levels
Add the following roles to the applicable service account at project and dataset levels:
Source Data Project
Role | Description |
|---|---|
BigQuery User — Project-level | Allows Kyvos to create and execute BigQuery jobs using |
BigQuery Data Viewer — Dataset-level | Allows Kyvos to view the dataset, access table metadata, and read/query the source data. |
Note
These roles provide read-only access to the source data; Kyvos does not need permissions to create, update, or delete source tables.
Required Permissions for Kyvos Dataset Preview Operation
To perform Kyvos Dataset Preview operation, add the following pre-defined roles.
Materialization Project
Pre-defined Role | Description |
|---|---|
BigQuery User — Dataset-level | Allows Kyvos to access and execute BigQuery jobs required for materialization. |
BigQuery Data Viewer — Dataset-level | Allows Kyvos to view the dataset, access table metadata, and read/query materialized data. |
Create a Kyvos custom role and add the following permissions to the role.
Permission | Description |
|---|---|
bigquery.tables.create | Allows creation of new tables |
bigquery.tables.delete | Allows deletion of existing tables |
bigquery.tables.update | Allows updating table metadata/properties |
bigquery.tables.updateData | Allows updating table data/content |
Grant the dataset level access to the applicable service account by assigning it the custom role containing the required permissions.
2.6 Exporting Data for BigQuery SQL Warehouse to Storage Bucket in User’s Specific Account
This enhancement enables exporting data from BigQuery to a Google Cloud Storage (GCS) bucket located in a different GCP project (customer project). With this configuration, BigQuery writes the exported data directly to the customer-owned bucket, while Kyvos manages the temporary and export files by applying the required IAM permissions.
2.6.1 BigQuery Configuration Steps
Create or identify a GCS bucket in the target customer project:
gs://<cross-project-bucket>/<path>/temp/Grant the following permissions:
storage.objects.get,storage.objects.create,storage.objects.list, andstorage.objects.delete.If using application's default credentials:
Grant all the above permissions to Kyvos' service account.
If using Google Service Account:
Grant
storage.objects.get,storage.objects.create, andstorage.objects.listto the BigQuery service account.Grant
storage.objects.get,storage.objects.list, andstorage.objects.deleteto the Kyvos' service account.
In the BigQuery connection, add the kyvos.connection.data.export.dir property and set the value to gs://<cross-project-bucket>/<path>
This directory should point to the GCS bucket location where the user needs to export BigQuery data.
3. Setting up BigQuery warehouse connection
To set up or view a BigQuery warehouse connection with no-spark, perform the following steps.
From the Toolbox, click Connections.
From the Actions menu ( ⋮ ) click Add Connection.
Enter a name or select it from the Connection list.
After you have entered the parameters described in the table below, click the Test button from the top left to validate the connection settings.
If the connection is valid, click the Save button.
To refresh connections, click the Actions menu ( ⋮ ) at the top of the Connections column and select Refresh.