# BigQuery

Churned seamlessly integrates with BigQuery as a destination connection. If you already use BigQuery, we highly recommend connecting to it, as it is the fastest way to experience the full value Churned has to offer. This integration ensures real-time data synchronization and enhances your ability to engage with customers effectively.

## How to connect BigQuery to Churned.io

1. **Login to Churned platform and go to integration part.** Click on "New Integration" and add BigQuery:

<div align="left"><figure><img src="https://246234927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSyCQUyE0u7ya9ULaprd%2Fuploads%2Fq2pH1gia8gb9T6TOC2Me%2FScreenshot%202026-02-05%20at%2012.12.22.png?alt=media&#x26;token=540a9c60-8707-42b0-87ab-110b983061f9" alt="" width="397"><figcaption></figcaption></figure></div>

2. After adding BigQuery, you will need many information as you can see in this image:

<div align="left"><figure><img src="https://246234927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSyCQUyE0u7ya9ULaprd%2Fuploads%2FLV31HWW95bgzuMz6n6Zs%2FScreenshot%202026-02-05%20at%2012.13.29.png?alt=media&#x26;token=c7b3f616-e5c9-4f7b-9fb0-91b1ecc2ce52" alt="" width="375"><figcaption></figcaption></figure></div>

Here's how you can get these details:

1. **Create a Service Account**:
   * Go to the Google Cloud Console.
   * Navigate to the IAM & Admin section, then select Service Accounts.
   * Click on "Create Service Account."
   * Fill in the necessary details, and then proceed.
2. **Assign Roles**:
   * Assign roles to your service account that grant it the necessary permissions to access BigQuery. Include "BigQuery Data Viewer", "BigQuery Job User" and "BigQuery Read Session User". All are required and will allow us to synchronize data.
3. **Create and Download a Key**:
   * After creating the service account, click on it, and go to the "Keys" section.
   * Click on "Add Key" and select "Create New Key."
   * Choose JSON format and click "Create." This will download a JSON file containing the credentials.
4. **Share credentials**&#x20;

**Option A: Upload JSON file directly in the integration form:**&#x20;

<div align="left"><figure><img src="https://246234927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSyCQUyE0u7ya9ULaprd%2Fuploads%2F93GXxTniVzk8phof9HTB%2FScreenshot%202026-02-05%20at%2013.21.54.png?alt=media&#x26;token=1599d4a2-1aec-4b0b-ac4c-102ecc9ec6f7" alt=""><figcaption></figcaption></figure></div>

**Option B: Extract Required Fields and fill in the integration form:**&#x20;

<div align="left"><figure><img src="https://246234927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSyCQUyE0u7ya9ULaprd%2Fuploads%2F8DiG7xOWKeEmBums4tn6%2FScreenshot%202026-02-05%20at%2013.22.23.png?alt=media&#x26;token=d28a3d70-92d2-4f4c-a0b8-d9ffaa5ca9fe" alt="" width="375"><figcaption></figcaption></figure></div>

* Open the downloaded JSON file in a text editor.
* The JSON file contains all the required fields for the integration form:

&#x20;            \- auth\_provider\_x509\_cert\_url

&#x20;            \- auth\_uri

&#x20;            \- client\_email

&#x20;            \- client\_id

&#x20;            \- client\_x509\_cert\_url

&#x20;            \- private\_key

&#x20;            \- private\_key\_id

&#x20;            \- project\_id

&#x20;            \- token\_uri

3. **Lastly, grant access for <applications@churned.io> to View BigQuery Tables**

**Steps:**

1. In the Google Cloud Console, navigate to the correct project.
2. Click on the hamburger menu and select **IAM & Admin → IAM**.
3. Click on **+ GRANT ACCESS**.
4. Enter the following details:
   * **New principals:** <applications@churned.io>
   * **Assign the right roles:**
     * BigQuery User
     * BigQuery Job User
5. Hit **SAVE**.
