# Big Query - Daily exports from AB Tasty to Big Query

Google BigQuery is a serverless, highly scalable and fully managed data warehouse that comes with a built-in query engine. BigQuery enables scalable analysis of petabytes of data.

The Google BigQuery integration allows you to export any data collected by AB Tasty’s tracking system to a Google BigQuery dataset, daily.

We will now proceed to configure the connector and the export.

## The connector <a href="#h_01htftc133np3w928jmtpj6tkd" id="h_01htftc133np3w928jmtpj6tkd"></a>

### Step 1: Activate BigQuery <a href="#h_01htftc133m9sndwxrbhnvfx6s" id="h_01htftc133m9sndwxrbhnvfx6s"></a>

Go to your [BigQuery](https://console.cloud.google.com/bigquery) console and activate BigQuery.

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-8bc4da4d3283c7c38a4d6dd41d69c56278483262%2Fe8ad0336435367e832b726a38a078d58.png?alt=media)

### Step 2: Create a service account <a href="#h_01htftdhm2fysayp1mrrg5vtch" id="h_01htftdhm2fysayp1mrrg5vtch"></a>

The service account is used to generate your credentials (in JSON format). More information on service accounts [here](https://cloud.google.com/iam/docs/service-account-overview?hl=fr).

1. Go to the service account

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-7cfdca594a5474a0f7ac5cc55dd8ecaa44757b05%2F7e9ef1e1484b36201f5706b9133806e7.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

2. Click on create Service account

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-22b58758795ad50a13549dcfbe467428a7366e87%2F5862260ec4d9d9b47134f92e5537481d.png?alt=media)

3. Enter a name and a description
4. Add a role: you must add “BigQuery User” and “BigQuery Data Editor”

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-1e16f9c1a9b2f57c98608ea98e68f0c5715f27d0%2F1dc653683f4a4d5bea4bf89c455a1821.png?alt=media)

5. Click on “done” to validate.

### Step 3: Create and export keys <a href="#h_01htftdhm2syghvp7b1x29ffyt" id="h_01htftdhm2syghvp7b1x29ffyt"></a>

Now that the service account is created, we will create the credential keys and export them.

1. Click on the new services account created<br>

   <figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-7d7514aa7b025622d8d2d5e23cd1baab74f8590c%2Fc6fbb9c28dec6971e939ec44a10dd204.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>
2. Go into your service account, then “Keys” and click “add key” > “create new key”
3. Select “JSON” and click “create”.
4. Download the key.

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-6c0b01304562a4057e861b58b3ce4318e098ba2a%2F6ade54a6cfad2c26693b0d5790e9c004.png?alt=media)

The content of the key should look like this:

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-17e68abd795a2b48da82cf924c2b95f44d245849%2F346857e19519c5584bb3bb06e95d3e7d.png?alt=media)

### Step 4: Create a new dataset <a href="#h_01htftkb6ezdz7wkw232pp61x6" id="h_01htftkb6ezdz7wkw232pp61x6"></a>

1. Go back to BigQuery
2. In the Explorer menu choose your GCP project and click the three dots, then click “Create dataset”

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-27cac267fbd5b5bca5bad7e63bf8370990d2076c%2F14d061989329321076349955cd3c094b.png?alt=media)

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-eec2968e7369f3888830524c966e57aa63acdc08%2Fe73c84220696d34f3b7119cc1870b8ec.png?alt=media)

3. Give it an ID and a location (no other mandatory options)
4. Click “create dataset”

Your dataset is now created and should appear in the Explorer menu. By clicking on your dataset you should be able to display its details.

More information on how to create a BigQuery dataset can be found [here](https://cloud.google.com/bigquery/docs/datasets).

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-1eee430256690b542996e52bc140fb57b66ec263%2F951bcd363e3a4fc5766164c2be0cf4a7.png?alt=media)

### Step 5: Set up the connector in AB Tasty <a href="#h_01htftmzp9g7z4ged90p9raqck" id="h_01htftmzp9g7z4ged90p9raqck"></a>

1. In AB Tasty, go to the Integration Hub page > Data Warehouse > BigQuery > setup connector
2. Enter a name for the connector
3. Enter the dataset location (info can be found in the details of the created dataset)
4. Enter the dataset ID (info can be found in the details of the created dataset). **Copy and paste the part to the right of the ". (see the above screenshot)**
5. Enter the project ID where your dataset is located. **Copy and paste the part to the left of the ". (see the above screenshot)**
6. Choose Service account as the Authorization Method
7. JSON credentials: paste the content of the key (JSON file) that was downloaded when you created the credentials.
8. Click on “Test connection”
9. Validate by clicking on “Next step”.

Your connector is now set up, and you can proceed to **set up your Export**.

You will get an error message, if one of the fields contains an error.

## The export <a href="#h_01htfts8thynbwsjzkdnwg5964" id="h_01htfts8thynbwsjzkdnwg5964"></a>

To set up your daily export, please refer to the guide: [Data Warehouse integrations: General information](https://docs.abtasty.com/integrations/other-integrations/data-warehouse/data-warehouse-integrations-general-information).

### Step 1: Generate your payload <a href="#h_01htftvzacsaxx146x4t0aw90e" id="h_01htftvzacsaxx146x4t0aw90e"></a>

Refer to the [Data Warehouse](https://docs.abtasty.com/integrations/other-integrations/data-warehouse/data-warehouse-integrations-general-information) article to create your payload.

### Step 2: Set up the export <a href="#h_01htftw5bsbfcrzrm89mzbnj1f" id="h_01htftw5bsbfcrzrm89mzbnj1f"></a>

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-6cdeb7159ac5466ee9d638abcadf0948fb3e06ba%2Fd166784c656156d5310a09c548fec3cb.png?alt=media)

1. Export name: the name of your export, give an explicit name to easily retrieve it in AB Tasty
2. Name of the table: the name of the table we will create in your BigQuery
3. Data exporter query: paste here the payload of your data explorer query
4. Click save and create.

The Google BigQuery integration is now complete, and you will soon see the data flowing into your dedicated Data Warehouse (It can take up to 2–3 hours, depending on the size of your report).

The export is activated upon creation, and new data will be appended to the current one, daily. The following screenshot shows that the export is activated on creation:&#x20;

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-3fec54d213acec00311d8a52d5f440c531acccaa%2Fbaea7dbbae0fd57e8fa6af03773d8fd1.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/integrations/other-integrations/data-warehouse/big-query---daily-exports-from-ab-tasty-to-big-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
