> For the complete documentation index, see [llms.txt](https://docs.adobesandbox.com/comprehensive-technical-tutorial-archive/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adobesandbox.com/comprehensive-technical-tutorial-archive/module12/ex4.md).

# 12.4 Load data from BigQuery into Adobe Experience Platform

## Objectives

* Map BigQuery data to an XDM schema
* Load BigQuery data into Adobe Experience Platform
* Become familiar with the BigQuery Source Connector UI

## Before you start

After exercise 12.3, you should have this page open in Adobe Experience Platform:

![demo](/files/USaHRWNnmrUV76ibo3Y8)

**If you have it open, continue with exercise 12.4.1.**

**If you don't have it open, go to** [**Adobe Experience Platform**](https://experience.adobe.com/platform/home)**.**

In the left menu, go to Sources. You'll then see the **Sources** homepage. In the **Sources** menu, click on **Databases**.

![demo](/files/QUSaSvFUQvdVxNGJtoqD)

Select the **Google BigQuery** Source Connector and click on **+ Configure**.

![demo](/files/BUWL3yLMk0WoFLJUqSXy)

You'll then see the Google BigQuery Account selection screen.

![demo](/files/8tywOS14mEPfNDRXZWsH)

Select your account and click **Next**.

![demo](/files/ZSlcQzJ8C9e9hRRUadOh)

You'll then see the **Add data** view.

![demo](/files/USaHRWNnmrUV76ibo3Y8)

## 12.4.1 BigQuery Table Selection

In the **Add data** view, select your BigQuery dataset.

![demo](/files/USaHRWNnmrUV76ibo3Y8)

You can now see a sample data preview of the Google Analytics data in BigQuery.

Click **Next**.

![demo](/files/NEu6DQ4jP4zlF6L1liOU)

## 12.4.2 XDM mapping

You'll now see this:

![demo](/files/XnJ6ZPZk4Kf8jmdsczwA)

You now have to either create a new dataset or select an existing dataset to load the Google Analytics data into. For this exercise, a dataset and schema have already been created. You do not need to create a new schema or dataset.

Select **Existing dataset**. Open the dropdown menu to select a dataset. Search for the dataset named `Demo System - Event Dataset for BigQuery (Global v1.1)` and select it. Click **Next**.

![demo](/files/hlohltsvsWk04BgusBGr)

Scroll down. You now need to map every **Source Field** from Google Analytics/BigQuery to an XDM **Target Field**, field by field.

![demo](/files/gqFR0LbkPrp33r3wIIML)

Use the below mapping table for this exercise.

| Source Field                 | Target Field                                    |
| ---------------------------- | ----------------------------------------------- |
| **\_id**                     | \_id                                            |
| **\_id**                     | channel.\_id                                    |
| timeStamp                    | timestamp                                       |
| GA\_ID                       | `--aepTenantId--`.identification.core.gaid      |
| customerID                   | `--aepTenantId--`.identification.core.loyaltyId |
| Page                         | web.webPageDetails.name                         |
| Device                       | device.type                                     |
| Browser                      | environment.browserDetails.vendor               |
| MarketingChannel             | marketing.trackingCode                          |
| TrafficSource                | channel.typeAtSource                            |
| TrafficMedium                | channel.mediaType                               |
| TransactionID                | commerce.order.payments.transactionID           |
| Ecommerce\_Action\_Type      | eventType                                       |
| Pageviews                    | web.webPageDetails.pageViews.value              |
| Unique\_Purchases            | commerce.purchases.value                        |
| Product\_Detail\_Views       | commerce.productViews.value                     |
| Adds\_To\_Cart               | commerce.productListAdds.value                  |
| Product\_Removes\_From\_Cart | commerce.productListRemovals.value              |
| Product\_Checkouts           | commerce.checkouts.value                        |

After copying and pasting the above mapping into the Adobe Experience Platform UI, please verify if you don't see any errors due to typos or leading/trailing spaces.

You now have a **Mapping** like this one:

![demo](/files/LgUcPtD4qwwlsJFAozIU)

The source fields **GA\_ID** and **customerID** are mapped to an Identifier in this XDM Schema. This will allow you to enrich Google Analytics data (web/app behavior data) with other datasets such as Loyalty or Call Center-data.

Click **Next**.

![demo](/files/gVXK5abxivwEAL1zGJ99)

## 12.4.3 Connection and the data ingestion scheduling

You'll now see the **Scheduling** tab:

![demo](/files/44UvWNisGzLDox7q5OR2)

In the **Scheduling** tab, you are able to define a frequency for the data ingestion process for this **Mapping** and data.

As you're using demo data in Google BigQuery that won't be refreshed, there's no real need for setting a schedule in this exercise. You do have to select something, and to avoid too many useless data ingestion processes, you need to set the frequency like this:

* Frequency: **Week**
* Interval: **200**

![demo](/files/hOGnIj27V4AtW8Fvivs7)

**Important**: be sure you activate the **Backfill** switch.

![demo](/files/madL651TguuI9sn6oYD7)

Last but not least, you must define a **delta** field.

![demo](/files/SSSucmEgs5Czjz7FKCxn)

The **delta** field is used to schedule the connection and upload only new rows that come into your BigQuery dataset. A delta field is typically always a timestamp column. So for future scheduled data ingestions, only the rows with a new, more recent timestamp will be ingested.

Select **timeStamp** as the delta field.

![demo](/files/pKZpTtzQ0cH82Q03l1Bi)

You now have this.

![demo](/files/6jz6u55ywBxqhH7uC7la)

Click **Next**.

![demo](/files/rEe1XLVw5V644QPYKAre)

## 12.4.4 Review and launch connection

In the **Dataset flow detail** view. you need to name your connection, which will help you to find it later.

Please use this naming convention:

| Field             | Naming                                         | Example                                            |
| ----------------- | ---------------------------------------------- | -------------------------------------------------- |
| Dataset flow name | DataFlow - ldap - BigQuery Website Interaction | DataFlow - vangeluw - BigQuery Website Interaction |
| Description       | DataFlow - ldap - BigQuery Website Interaction | DataFlow - vangeluw - BigQuery Website Interaction |

![demo](/files/kleKpon8sCFHzkInhFEI)

Click **Next**.

![demo](/files/jJIl6PfLb8cI34tYjn42)

You now see a detailed overview of your connection. Make sure everything is correct before you continue, as some settings can't be changed anymore afterwards, like for instance the XDM mapping.

![demo](/files/C5ccPkRg8W9dOxeUvn0o)

Click **Finish**.

![demo](/files/JeaZJGfvUYCmuWwcS92e)

Setting up the connection may take some time, so don't worry if you see this:

![demo](/files/CfWupEw3ByfUZj5FISuq)

Once the connection has been created, you'll see this:

![demo](/files/0EtN1wMOMnDbgiwz5IIo)

You're now ready to continue with the next exercise, in which you'll use Customer Journey Analytics to build powerful visualizations on top of Google Analytics data.
