Connecting to Google BigQuery
- To add a new connection, navigate to the File top menu and click on Edit Connections (or press [⌘ + O] | [Ctrl + O]), or click the Add icon (➕) next to the Connections header in the Database Explorer panel, and select BigQuery:
- To finish creating a connection, enter valid data in the fields of the New connection dialog:
- Connection name – Replace the default New Connection with a meaningful value.
- Database JDBC driver – Specify user drivers for the data source, or click the 'download them' link below this field settings area. For detailed instructions on setting up drivers, see Add a user driver to an existing connection.
- Host – The default value is https://www.googleapis.com/bigquery/v2.
-
Authentication – The default value is Service Account.
The Simba JDBC Driver for Google BigQuery uses the OAuth 2.0 protocol for authentication and authorization. It authenticates your connection through Google OAuth APIs.
For more information about OAuth authentication using a service account, see "Using OAuth 2.0 for Server to Server Applications" in the Google Identity Platform documentation: https://developers.google.com/identity/protocols/OAuth2ServiceAccount.
Going forward, the following types will be available: Google User Account, Pre-Generated Access and Refresh Tokens, Application Default Credentials, etc.. - Project ID– Set the name of your BigQuery project.
- Connection timeout (sec) – The default value is 10. Specify another timeout, if needed, to tell the session when to disconnect.
- Advanced Properties – Supply additional JDBC parameters if needed.
- Click Test to ensure that the connection to the data source is successful.
- Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.
🔎 NOTE: If you need more advanced information on how to set up a BigQuery connection, please, contact us through support@coginiti.co
Connect to BigQuery platform using a Google Service Account
Before you begin:
- Create a Project resource (see https://cloud.google.com/resource-manager/docs/creating-managing-projects).
- Create a Service Account for your Project in the API Console (see https://cloud.google.com/iam/docs/creating-managing-service-accounts).
- Create Service Account key (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
- Download the private key file from the Google API Console web page.
- Select ‘BigQuery’ item from the dropdown:
- Populate the connection properties on the ‘Connections’ screen:
2.1. Fill in the ‘Connection name’ field
2.2. Create JDBC driver and download driver files:
on the ‘Connections’ screen: click the ‘download them’ link
OR
on the ‘JDBC Drivers’ screen:
- select ‘BigQuery’ item from the dropdown:
- click the ‘Download’ and then ‘Create driver’ button:
🔎 NOTE: If you are experiencing issues or have special needs, get the necessary JDBC drivers from your DB vendor or from the public Maven repository (see https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers) and download them manually.
- select created driver from the ‘Database JDBC driver’ dropdown on the ‘Connections’ screen:
2.3. Select ‘Service Account’ from the ‘Authentication’ dropdown
2.4. Set the ‘Private Key’ property:
copy a body of the private key file (in .json format) that is used to authenticate the service account email address, and paste it to the field
OR
select the private key file from the directory:
2.5. Set the ‘Service Account Email’ property to your Google service account email address
2.6. Set the ‘Project ID’ property to the name of your BigQuery project
🔎 NOTE: You must manually fill in the ‘Project ID’ field when creating the connection.
2.7. Save created connection.
- Create database objects and review them in the ‘Database Explorer’ and ‘Search’ panels:
Connect to BigQuery platform using a Google User Account
Before you begin
- Create a Project resource (see https://cloud.google.com/resource-manager/docs/creating-managing-projects).
- Create your client credentials (see https://support.google.com/cloud/answer/6158849?hl=en). While configuring client credentials, fill in Authorized redirect URIs with
https://{coginiti-hostname}/api/oauth/bigquery
After creation, you'll see your "Client ID" and "Client Secret". Note these down for the Coginiti configuration.
- Navigate to the 'Connections' screen to add a connection to BigQuery platform:
- Select ‘User Account’ from the ‘Authentication’ dropdown
- Populate 'Client ID' and 'Client Secret' fields with ID and secret values of your client credentials (created above)
- Fill in the ‘Project ID’ field with the name of your BigQuery project
🔎 NOTE: You must manually fill in the ‘Project ID’ field when creating the connection.
- Click the 'Test' button to initiate an OAuth consent flow
- Once the flow is complete, return to the 'Connections' screen to verify that the connection was successful and save it: