Skip to content

BigQuery

This document provides the specific information relevant to creating BigQuery connections. To understand the overall connection and registration flow see Connections Overview

Before you begin

Before you create a BigQuery connection in Okera, you will need to set up a BigQuery Service account and download the associated service account key.

  1. Create a BigQuery Service account. Looker's documentation has some easy to follow instructions on how to do this.
  2. Grant the desired BigQuery permissions for the Okera connection to this service account.
  3. Download the BigQuery service account private key certificate.
  4. Upload and set the location of your BigQuery service account key on your Okera cluster as BIGQUERY_PRIVATE_KEY in your cluster config file.

Create a BigQuery connection

Create a new BigQuery connection from the Connections Page.

BigQuery connection example

You will need to input these properties:

  • Project Name: The Google project ID. Note please use the project ID here and not the project name.
  • Service Account Name: The username for your BigQuery service account.

Test your connection to see if it works. If you receive an error please check that:

  • BIGQUERY_PRIVATE_KEY has been correctly configured on your cluster
  • Your BigQuery service account has enough permissions to read data from your BigQuery project
  • That you input the project ID and not the project name

Programmatic Example

CREATE DATACONNECTION bigquery_connection_03 CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='bigquery',
  'connection_properties'='{
    "url":"jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<Project_ID>;OAuthType=0;OAuthServiceAcctEmail=<Service_account_name>;OAuthPvtKeyPath={BIGQUERY_PRIVATE_KEY}"
    }'
);