Skip to main content

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​

ScenarioSupport Status
Data IntegrationRead BigQuery data and write to warehouse tables
Data Write-backNot 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 NameRequiredDefaultDescription
trino.bigquery.project-idYes-BigQuery project ID
trino.bigquery.credentials-fileYes-Google Cloud credentials file path
trino.bigquery.views-enabledNofalseWhether to enable view support
trino.bigquery.arrow-serialization.enabledNotrueWhether 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 TypeTrino TypeVeloDB Cloud Type
booleanbooleanboolean
int64bigintbigint
float64doubledouble
numericdecimal(P, S)decimal(P, S)
bignumericdecimal(P, S)decimal(P, S)
stringvarcharstring
bytesvarbinarystring
datedatedate
datetimetimestamp(6)datetime(6)
timetime(6)string
timestamptimestamp with time zone(6)datetime(6)
geographyvarcharstring
arrayarrayarray
mapmapmap
structrowstruct