# Google BigQuery
URL: https://docs.datarobot.com/en/docs/reference/data-ref/data-sources/dc-bigquery.html

# Google BigQuery

> [!NOTE] Self-Managed AI Platform installations
> The redirect URI for BigQuery OAuth has been updated to: `https://my.datarobot.com/account/google/google_authz_return`. The old redirect URI `https://my.datarobot.com/account/google/bigquery_authz_return` will be deprecated in an upcoming release. For more information, see the BigQuery & Google Drive section of the DataRobot Installation Guide.

## Supported authentication

- OAuth
- Google Cloud service account

## OAuth

### Prerequisites

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

- A Google account authenticated with OAuth
- Data stored in Google BigQuery

### 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 forcreating a data connection—making sure the minimumrequired parametersare filled in—andtesting the connection.
2. After clickingTest Connection, a window appears. ClickSign in using Google.
3. Select the account you want to use.
4. To provide consent to the database client, clickAllow.

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

### 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 |

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

## Google Cloud service account

### 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

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 forcreating a data connectionandtesting the connection.
2. UnderCredential type, selectGoogle Cloud Service Accountand fill in therequired parametersfor manual configuration.
3. ClickSave and sign in.

### 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. |
| Service Account Key | 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. |
| Display name | A unique identifier for your credentials DataRobot. | You can access and manage these credentials under this display name. |

## 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.
- External tables created from Google Drive are not supported.
- If you are connecting to both Google Drive and BigQuery with OAuth authentication, deleting the BigQuery OAuth credential bigquery-oauth will also remove the Google Drive OAuth credential (if it exists).

## Troubleshooting

| Problem | Solution | Instructions |
| --- | --- | --- |
| When attempting to execute an operation in DataRobot, the firewall requests that you clear the IP address each time. | Add all allowed IPs for DataRobot. | See Allowed source IP addresses. If you've already added the allowed IPs, check the existing IPs for completeness. |
| Issue authenticating Google BigQueryNeed to reset the Google user assigned to authentication | Locate and remove the bigquery-oauth credential. | In DataRobot, navigate to the Credentials Management tab.Select the bigquery-oauth credential and click Delete.Select User Settings > Data Connections.Reauthenticate your Google BigQuery data connection. |
| Issue authenticating Google BigQuery | Remove authentication consent in Google Cloud console. | Navigate to your Google Account permissions.Select DataRobot under third-party applications.Click Remove Access. |
| redirect_uri mismatch (self-managed only ) | Update the redirect URI for BigQuery. | If you were previously using redirect URI https://my.datarobot.com/account/google/bigquery_authz_return, your admin must update the redirect URI to https://my.datarobot.com/account/google/google_authz_return in the Google OAuth configuration. If you need to continue using the old redirect URI, an admin can set the EngConfig BIGQUERY_OAUTH_USE_OLD_REDIRECT_URI to True. |

---
