# Google BigQuery {: #google-bigquery }

## Supported authentication {: #supported-authentication }

- [OAuth](#oauth)
- [Google Cloud service account](#google-cloud-service-account)

## OAuth {: #oauth }

### Prerequisites {: #prerequisites }

The following is required before connecting to Google BigQuery in DataRobot:

- A Google account [authenticated with OAuth](https://cloud.google.com/bigquery/docs/authorization){ target=_blank }
- Data stored in Google BigQuery

### Set up a connection in DataRobot {: #set-up-a-connection-in-datarobot }

When connecting with OAuth parameters, you must create a new data connection.

To set up a data connection using OAuth:

1. Follow the instructions for [creating a data connection](data-conn#create-a-new-connection)&mdash;making sure the minimum [required parameters](#required-parameters) are filled in&mdash;and [testing the connection](data-conn#test-the-connection). 

2. After clicking **Test Connection**, a window appears. Click **Sign in using Google**.

    ![](images/oauth-google-1.png)

3. Select the account you want to use.

    ![](images/oauth-google-2.png)

4. To provide consent to the database client, click **Allow**.

If the connection is successful, the following message appears in DataRobot:

![](images/snowflake-sso-9.png)

### Required parameters {: #required-parameters }

The table below lists the minimum required fields to establish a connection with Google BigQuery:

Required field | Description |  Documentation
--------------- | ---------- |  -----------
`Projectid`       | A globally unique identifier for your project.  |    [Google Cloud documentation](https://cloud.google.com/resource-manager/docs/creating-managing-projects){ target=_blank }

Learn about additional configuration options for Google BigQuery in the Google Cloud documentation.

## Google Cloud service account {: #google-cloud-service-account }

### Prerequisites {: #prerequisites }

The following is required before connecting to Google BigQuery in DataRobot:

- A Google Cloud service account
- Data stored in Google BigQuery

### Set up a connection in DataRobot {: #set-up-a-connection-in-datarobot }

When connecting with a service account, you must create a new data connection.

To set up a data connection using service account:

1. Follow the instructions for [creating a data connection](data-conn#create-a-new-connection) and [testing the connection](data-conn#test-the-connection).

2. Under **Credential type**, select **Google Cloud Service Account** and fill in the [required parameters](#required-parameters) for manual configuration.

    ![](images/new-bigquery-2.png)

3. Click **Save and sign in**.

### Required parameters {: #required-parameters }

The table below lists the minimum required fields to establish a connection with Google BigQuery:

Required field | Description |  Notes
--------------- | ---------- |  -----------
`Projectid`       | A globally unique identifier for your project.  |    See the [Google Cloud documentation](https://cloud.google.com/resource-manager/docs/creating-managing-projects){ target=_blank }.
[Service Account Key](https://cloud.google.com/iam/docs/service-account-creds#key-types){ target=_blank }       | The public/private RSA key pair associated with each service account that can be provided as a JSON string or loaded from a file. |   See the Google Cloud documentation, [List and get service account keys](https://cloud.google.com/iam/docs/keys-list-get#get-key){ target=_blank }.
Display name       | A unique identifier for your credentials DataRobot.   |  You can access and manage these credentials under this display name.

## Feature considerations {: #feature-considerations }

- You cannot use multiple Google accounts to authenticate Google BigQuery in DataRobot. Once a Google user is authenticated via OAuth, that Google account is used for all the BigQuery data connections for that DataRobot user.
- If your Google account has a large number of projects, it may take a long time to list schemas, even if the project is filtered with the `projectID` parameter.

{% include 'includes/data-conn-trouble.md' %}
Issue authenticating Google BigQuery<br><br>Need to reset the Google user assigned to authentication      | Locate and remove the `bigquery-oauth` credential.  | <ol><li>In DataRobot, navigate to the **Credentials Management** tab.</li><li>Select the `bigquery-oauth` credential and click **Delete**.</li><li>Select **User Settings > Data Connections**.</li><li>Reauthenticate your Google BigQuery data connection.</li></ol>
Issue authenticating Google BigQuery      | Remove authentication consent in Google Cloud console.  | <ol><li>Navigate to your [Google Account permissions](https://myaccount.google.com/u/1/permissions){ target=_blank }.</li><li>Select **DataRobot** under third-party applications.</li><li>Click **Remove Access**.</li></ol>
