---
title: "Google BigQuery Data Source"
slug: "google-bigquery-data-source"
updated: 2025-10-27T14:05:26Z
published: 2025-10-27T14:05:26Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plainid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Google BigQuery Data Source

Google BigQuery (GBQ) can serve as a Policy Information Point (PIP) Data Source in the Authorization Platform, enabling you to use attributes stored in GBQ as part of your policy logic. This is done via a JDBC connection using the official Google BigQuery JDBC driver.

This guide walks you through the setup process, from configuring your GBQ environment and service account to integrating the driver with the Policy Authorization Agent (PAA). Once configured, you’ll be able to create Data Sources, Models, and Views that reference BigQuery data within the platform’s policy engine.

### Initial Setup

To complete the initial setup in GBQ, the following initial steps are required:

1. In GBQ, create a Service Account with the following roles:
   - BigQuery Connection User
   - BigQuery Data Viewer
   - BigQuery User
2. Download the service account key to a safe location for future use (as detailed below).

### Authorization Platform Setup

A PAA instance should include the GBQ JDBC driver. You can get the GBQ JDBC driver using the following link: [SimbaJDBCDriverforGoogleBigQuery42_1.3.0.1001.zip](https://storage.googleapis.com/simba-bq-release/jdbc/SimbaJDBCDriverforGoogleBigQuery42_1.3.0.1001.zip)

#### Containerized PAA

1. Place the driver in the relevant location. You need to include the driver in the `custom-values.yaml` as described in the PlainID Developer Portal [here](/v1/docs/en/helm-chart#load-thirdparty-drivers-by-modifying-the-pipoperator-start-command){target=`_blank`}.

2. Add the following lines to the `custom-values.yaml` file:

![image](https://lh3.googleusercontent.com/QxgclPmo09yepxVuhc7Rlh8rr_A_T9nFZCoYKnCr0LGZxv5CkmBdWP9b3yYrcJk7nR4CzihesZR8fMlMl8pFx5B0i2_TzV4x7Y587pSt5cAdprHgVafCVR2KhGxEz33eSWSaEUwJVvzjwc1F8wRMTlQ)

   You will reference this Secret in the Data Source connection configuration as described below.

#### Standalone/VM PAA

- Place the driver files in the PIP adapters drivers location: `$PLAINID_HOME/pip-operator/lib/`
  - Unzip the `SimbaJDBCDriverforGoogleBigQuery42_1.3.0.1001.zip` file you downloaded into `$PLAINID_HOME/pip-operator/lib`.
  - After unzipping the file, you should have the driver jar file `GoogleBigQueryJDBC42.jar` and a libs folder with many other required files.
  - From the **lib** folder, you need to delete `slf4j-api-*.jar`.
  - From the **lib** folder, you can delete the original zip file.
- Place the GBQ service account key (json file) at `$PLAINID_HOME/pip-operator/conf`

### PIP Settings

After the initial setup, you can create a new Data Source with JDBC adapter in the PIP UI and use it as a View. Follow the instructions of Data Sources, Models, and Views creation under the JDBC adapter documentation [here](/v1/docs/jdbc-data-sources).

### Integration Steps

To integrate Google BigQuery:

1. In the **Connection Adapter drop-down list**, select the **Simple JDBC adapter**.
2. For the Driver Class Name, you should refer to the newly added GBQ driver with this value: `com.simba.googlebigquery.jdbc.Driver`

![image](https://lh3.googleusercontent.com/1ceq1HXkDzpHtNvkhCxpspFG5L6Wicf-Pudff73t4DJnz7GJU5wkT3L-1daUFWYPWehK4CcQN0sJouhwmhpmeX0mbD2QzhrCGgmP9TRaR8wANYovT-Hk9ovSQykZGEW0kUjhY0rASfvJGwmnN3x7W7w)

In the **Policy Authorization Agent** section, in the **URL** field use this value with your specific details:

`jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<BigQuery_Project_ID>;OAuthType=0;OAuthServiceAcctEmail=<Service_Account_Name>;OAuthPvtKeyPath=<GBQ_KEY_PATH>;DefaultDataset=<Default_Dataset>;QueryDialect=SQL/app/conf/plainid-presales-f3509fa53b6e.json`


Make the following replacements above:

- **BigQuery_Project_ID** - Replace this param with your projectID
- **Service_Account_Name** - Replace this parameter with your Service Account details, ex. bq@example.iam.gserviceaccount.com
- **GBQ_KEY_PATH** - Replace this param with the Secret Key location as you configured above:
  - For containerized - `/app/conf/plainid-presales-f3509fa53b6e.json`
  - For VM PAA - `/opt/plainid/pip-operator/conf/plainid-presales-f3509fa53b6e.json`

3. In the **Models** section, make sure you have these keys:
- Key - importer.tableTypes, Value - TABLE,VIEW
- Key - importer.schemaPattern, Value - demo

4. Click on the **Generate DDL** button or create foreign tables manually.

**NOTE:** If you generate DDL, all your GBQ schema will be created in the model.

**NOTE:** If you generate DDL, you will need to delete the option 'name in source' from each table in the DDL.

![K8s PAA](https://lh6.googleusercontent.com/jdulmOm71JC-slt0zY0AhHWwtibfWTer6oVRh-n4HzNhKIsfGvlPa_SkxV-gYBve1vdqCNWt9IFJdaHscrrJkwYEuof5Vh2V5JFUarKPivGS7KFvfNQDluUZNUtM9gESqDcfHmyfEIoVlHOKYs94xGI)

![VM PAA](https://lh4.googleusercontent.com/RMoywxvRjbWfgs6R-EfojCyLaBEpTajdj5ObNAWlj7Funn5LxJO7ro8a8I-m6tb-yfp4iwbXJYtLZMM4y8vEzWNQkFs22RSjIuBdjRyWRKs6bi-gMAyPCzM6HjqEp9J8h4DOuWurBAX5aNH-gDe2M1Y)

5. Save the new Data Source and continue your PIP configuration as described in the PIP section of the documentation considering the **GBQ source** as a SQL source.
