ODBC and JDBC drivers for BigQuery

Introduction

To empower users to harness the capabilities of BigQuery and GoogleSQL, Google partners with Simba to provide dedicated Java Database Connectivity (JDBC) and Open Database Connectivity (ODBC) drivers.

The JDBC and ODBC drivers let you use BigQuery with your preferred tooling and infrastructure. These drivers let you access BigQuery features like high-performance storage integration and reservations management that are otherwise only available through the BigQuery APIs. These specialized drivers are designed specifically for BigQuery and can't be used with other products or services. You don't need any additional licenses to use these drivers.

Current ODBC drivers

The following drivers are the latest stable releases of the ODBC driver.

ODBC release 3.0.5.1011

ODBC release 2.5.2.1004

We recommend that you upgrade to the 3.x release. The 2.5.x release is supported for bug fixes and critical security updates, but new BigQuery features are only be added to the 3.x release.

Current JDBC drivers

The following drivers are the latest stable releases of the JDBC driver.

JDBC release 1.6.1.1002

Required permissions for the ODBC HTAPI

The High-Throughput API (HTAPI) is an optional API for ODBC. For more information about the HTAPI, see the Installation and Configuration Guide.

To get the permissions that you need to use the High-Throughput API, ask your administrator to grant you the BigQuery Read Session User (roles/bigquery.readSessionUser) IAM role on your BigQuery project. For more information about granting roles, see Manage access.

This predefined role contains the permissions required to use the High-Throughput API. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to use the High-Throughput API:

  • resourcemanager.projects.get
  • resourcemanager.projects.list
  • bigquery.readsessions.create
  • bigquery.readsessions.getData
  • bigquery.readsessions.update

You might also be able to get these permissions with custom roles or other predefined roles.

Limitations

  • JDBC and ODBC drivers don't support the BigQuery high-performance load or export features. You can perform data inserts with data manipulation language (DML) statements, but these statements are subject to the limits on DML statements.
  • JDBC and ODBC drivers don't support GoogleSQL ARRAY and STRUCT data types. If output for these data types is requested from the drivers, the drivers render the data types into a JSON format. To avoid JSON output, consider flattening repeated values or selecting specific fields from a record.
  • JDBC and ODBC drivers don't support query prefixes.
  • JDBC and ODBC drivers support parameterized queries, but preparing a query with parameters only provides query validation. Parameterized queries with the JDBC and ODBC drivers don't affect query performance.

Support

Support for the JDBC and ODBC drivers is available from Cloud Customer Care.

Pricing

The drivers are available to download at no cost. However, costs for running queries using the drivers vary depending on your configuration:

  • Query pricing applies by default to all queries from the driver. This is the only pricing model used unless the driver is configured to support large result sets.
  • Storage pricing applies in addition to query pricing when the driver is configured to write large result sets to a destination table. This data is stored for 24 hours, and you incur storage charges for that duration.
  • Storage API pricing applies only when you use driver to invoke the Storage API. This pricing model covers data read directly from query results, not the data scanned during query execution. It is important to note that Storage API pricing only applies to large result sets.