BigQuery Catalog
Run catalog SQL with a warehouse SQL user that can manage catalogs and access the source. Ensure network access from the warehouse to metadata, storage, and source endpoints. For connector deployment, host files, JVM settings, or service configuration changes, contact VeloDB Cloud support.
Note:
This integration is experimental. Confirm connector availability and the required endpoint and credential configuration with VeloDB Cloud support before using these examples.
Overview
BigQuery Catalog uses the Trino BigQuery Connector to access BigQuery tables through the Trino Connector compatibility framework.
Note:
- This connector is experimental.
- This feature does not depend on a Trino cluster environment and only uses the Trino compatibility plugin.
Use cases
| Scenario | Support Status |
|---|---|
| Data Integration | Read BigQuery data and write to warehouse tables |
| Data Write-back | Not supported |
Version compatibility
- Warehouse: Confirm connector availability with VeloDB Cloud support.
- Trino Connector Version: 435
- BigQuery Version: For supported versions, please refer to Trino Documentation
Quick start
1. Prepare the managed connector
Contact VeloDB Cloud support to confirm this experimental connector's availability, plugin version, source credentials, and network access for the warehouse. Plugin installation and service restarts are managed operations. For BigQuery, service-side Google Cloud credentials must be configured for the connector; running gcloud auth on your client does not configure the warehouse.
2. Create a catalog
Basic Configuration Example
CREATE CATALOG bigquery_catalog PROPERTIES (
'type' = 'trino-connector',
'trino.connector.name' = 'bigquery',
'trino.bigquery.project-id' = 'your-bigquery-project-id',
'trino.bigquery.credentials-file' = '/path/to/application_default_credentials.json'
);
3. Query data
After creating the Catalog, you can query BigQuery table data in three ways:
-- Method 1: Query after switching to Catalog
SWITCH bigquery_catalog;
USE bigquery_db;
SELECT * FROM bigquery_tbl LIMIT 10;
-- Method 2: Use two-level path
USE bigquery_catalog.bigquery_db;
SELECT * FROM bigquery_tbl LIMIT 10;
-- Method 3: Use fully qualified name
SELECT * FROM bigquery_catalog.bigquery_db.bigquery_tbl LIMIT 10;
Configuration
Catalog configuration parameters
The basic syntax for creating a BigQuery Catalog is as follows:
CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
'type' = 'trino-connector', -- Required, fixed value
'trino.connector.name' = 'bigquery', -- Required, fixed value
{TrinoProperties}, -- Trino Connector related properties
{CommonProperties} -- Common properties
);
TrinoProperties parameters
TrinoProperties are used to configure Trino BigQuery Connector-specific properties, prefixed with trino.. Common parameters include:
| Parameter Name | Required | Default | Description |
|---|---|---|---|
trino.bigquery.project-id | Yes | - | BigQuery project ID |
trino.bigquery.credentials-file | Yes | - | Google Cloud credentials file path |
trino.bigquery.views-enabled | No | false | Whether to enable view support |
trino.bigquery.arrow-serialization.enabled | No | true | Whether to enable Arrow serialization for performance |
For more BigQuery Connector configuration parameters, please refer to the Trino Official Documentation.
CommonProperties parameters
CommonProperties are used to configure common Catalog properties, such as metadata refresh policies and access control. For detailed information, please refer to the "Common Properties" section in Catalog Overview.
Data type mapping
When using BigQuery Catalog, data types are mapped according to the following rules:
| BigQuery Type | Trino Type | VeloDB Cloud Type |
|---|---|---|
| boolean | boolean | boolean |
| int64 | bigint | bigint |
| float64 | double | double |
| numeric | decimal(P, S) | decimal(P, S) |
| bignumeric | decimal(P, S) | decimal(P, S) |
| string | varchar | string |
| bytes | varbinary | string |
| date | date | date |
| datetime | timestamp(6) | datetime(6) |
| time | time(6) | string |
| timestamp | timestamp with time zone(6) | datetime(6) |
| geography | varchar | string |
| array | array | array |
| map | map | map |
| struct | row | struct |