# Google BigQuery (Service Account)

*BigQuery (Service User) support is currently **in beta**. Please raise any issues you encounter via the chat bubble in the bottom-right of the site, and we'll be happy to help.*

***

### Overview

Our BigQuery integration allows you to import your data, allowing you to clean and transform your data as well as ask it questions via Chat Explore.&#x20;

This connection uses a Google Cloud *service account*. You will need access to IAM within your Google Cloud project.

{% hint style="danger" %}
You must allow network traffic from the public IP address `54.197.189.139` in order to allow Akkio to access your data.
{% endhint %}

### Create a Service Account

Click on this link to go to Google Cloud's service accounts page: <https://console.cloud.google.com/iam-admin/serviceaccounts>

If necessary, click on "CREATE SERVICE ACCOUNT" and set up a user.&#x20;

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FWrKkBV1YMrTuNTkjrruC%2Fimage.png?alt=media&#x26;token=94aea8c7-44f1-4a6e-930d-5d3cffe40b92" alt=""><figcaption></figcaption></figure>

You must assign a Role to the user that has at least the following IAM Permissions: **BigQuery Data Editor**, **BigQuery Job User, BigQuery Read Session User**\
\
You may use an existing role or create a new one. For documentation on how to create a Google IAM role, visit <https://cloud.google.com/iam/docs/creating-custom-roles>

### Download Service Account Token

Click on this link to go to Google Cloud's service accounts page: <https://console.cloud.google.com/iam-admin/serviceaccounts>

Click the 3 dots next to your service account and select Manage keys

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2F8PcLmlAA9P9RHFCmLIZA%2Fimage.png?alt=media&#x26;token=2a07d8b7-3a8e-42aa-af28-4badb371f5e9" alt=""><figcaption></figcaption></figure>

Click the Add Key button and select "Create new key"

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FWFhS93AVGAW8xX2JhuDN%2Fimage.png?alt=media&#x26;token=ede645c8-3e9c-421e-a2e0-e62cb0063ca5" alt=""><figcaption></figcaption></figure>

Choose JSON. Clicking "Create" will download the JSON token

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2F65zGIEQsPui51WyIqii6%2Fimage.png?alt=media&#x26;token=f1e8a415-57c0-48de-85d1-894a33eb016e" alt=""><figcaption></figcaption></figure>

### Importing Data into Akkio

To import data, first create a new project.

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FdzRUyoi653UvHY5Pzlzy%2Fimage.png?alt=media&#x26;token=43feadb3-8876-4c92-8f1b-960d30c9e399" alt=""><figcaption></figcaption></figure>

Select the Google BigQuery Service Account button.

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FyPkRUcaejxnAoPTqyiwR%2Fimage.png?alt=media&#x26;token=dcea29e5-4da2-432f-bd5b-d1ac59147540" alt="" width="368"><figcaption></figcaption></figure>

Name your connection (like "My BigQuery Connection") and upload the JSON key you downloaded

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2Fiy4ex82q7L657F8nHUMh%2Fimage.png?alt=media&#x26;token=e933b7ae-ccc9-41ca-be22-5aba783ee3c0" alt=""><figcaption></figcaption></figure>

Enter your BigQuery's dataset and table name information

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FLEUBHNr7A9MonadLGtUR%2Fimage.png?alt=media&#x26;token=c8fd490b-8e81-4f2e-9e35-7c0348ed8f0e" alt=""><figcaption></figcaption></figure>

Your data will begin to load

<figure><img src="https://71333621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUiovvmaDi_ad2DYdZ4%2Fuploads%2FWK7TkhlljGgEipinmgFT%2Fimage.png?alt=media&#x26;token=077d97dc-be33-4a4c-9a07-08c50afbe0cf" alt=""><figcaption></figcaption></figure>

After a dataset is connected, the Flow will look the same as usual; you can merge with another dataset, modify using [Chat Data Prep](https://app.gitbook.com/o/-MUk5bRiktgkKBJI46_9/s/-MUiovvmaDi_ad2DYdZ4/building-a-model/selecting-model-data/chat-data-prep), or make a prediction.
