---
title: Create Data Views
slug: emea-aep-bootcamp-sb22/create-data-views
docTags: 
createdAt: 2024-01-30T23:36:00.578Z
---

## Objectives

- Understand the Data View UI
- Understand the basic settings of visit definition
- Understand Attribution and Persistence within a Data View

## Data View

With your connection done, you can now progress to influencing visualization. A difference between Adobe Analytics and CJA, is that CJA needs a Data View in order to clean and prepare the data before visualization.

A Data View is similar to the concept of Virtual Report Suites in Adobe Analytics, where you define context-aware visit definitions, filtering and also, how the components are called.

You’ll need a minimum of one Data View per Connection. However, for some use-cases, it’s great to have multiple Data Views for the same connection, with the goal of giving different insights to different teams. If you want your company to become data-driven, you should adapt how data is viewed in each team. Some examples:

- UX metrics only for the UX Design team
- Use the same names for KPIs and Metrics for Google Analytics as for Customer Journey Analytics so that the digital analytics team can speak 1 language only.
- Data View filtered to show for instance data for one market only, or one brand, or only for Mobile Devices.

1. Navigate to the **Data Views** screen.
2. Click on the icon **Create new data view.**

You'll be redirected to the **Create Data View** workflow

## Data View Definition&#x20;

You can now configure the basic **settings** for your Data View.

1. Select the **Connection** you created in the previous exercise from the Connection drop down.

For this exercise you can use the Connection: `AEP Bootcamp - Data Connection (WKND)`

1. Give your Data View a name following this naming convention: `[Your name] - AEP Bootcamp Data View`
2. For the time, select the timezone **Greenwich Mean Time; Monrovia, Casablanca \[GMT]**. This is a really interesting setting as some companies operate in different countries and geographies. Allocating the right time zone for each country will avoid typical data mistakes such as believing that for instance, in Peru, the majority of the people buy T-shirts at 4:00 AM.
3. You can also modify the main metrics naming (Person, Session and Event). This is not required but some customers like to use People, Visits and Hits instead of Person, Session and Events (default naming convention from Customer Journey Analytics)

You should now have the following settings configured:

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab3Cja/Screenshot2023-09-20at18.34.15.png)

Select **Save and Continue.**

## Data View Components

In this exercise, you'll configure the components you need to analyse the data and visualise it using Analysis Workspace. In this UI, there are three main areas:&#x20;

- Left side: Available components from the selected datasets
- Middle: Added components to the Data View
- Right Side: Component settings

You now have to drag and drop the components you need for the analysis to the **Components Added**. To do this, you need to select the components in the left menu and drag and drop them onto the canvas in the middle.

- Let’s start with the first component: **Page** **Name (web.webPageDetails.name)**. Search for this component, then drag and drop it onto the canvas.
- This component is the page name, as you can derive from reading the schema field `(web.webPageDetails.name)`.

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab3Cja/Screenshot2023-04-24at15.17.17.png)

Something really important is the **Persistence settings**. The concept of eVars and prop doesn’t exist in CJA but the Persistence settings make a similar behaviour possible.

If you don’t change these settings, CJA will interpret the dimension as a **Prop** (hit level). Also, we can change the Persistence to make the dimension an **eVar** (persist the value across the journey).

Let’s leave the Page Name as a Prop. As such, you don’t need to change any **Persistence Settings**.

:::hint{type="info"}
Persistence settings on metrics can also be changed in Analysis Workspace. In some cases you may choose to set it here to avoid business users from having to choose which is the best persistence model.
:::

Next, you’ll have to configure all of your Dimensions and Metrics that you want in your Data view. Since we have limited time in our Hands-on Lab we will **add all** Dimensions and Metrics to our DataView.

1. Ensure **Contains data** is applied as a filter under the Search bar
2. Select **Add all** underneath Schema Fields.

Your configuration should then look like this (Note, you may want to make the names of some variables more user friendly):

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab3Cja/Screenshot2023-09-20at18.35.06.png)

- Don't forget to **Save** your Data View. Click **Save** now.

### Component Settings

In some cases you may want to create new components based on the values captured in your variables. For example, when someone places a call with the call centre we could capture an **EventType** value of `callcenter.dialIns`  in our Experience Event data being ingested.

We want to create a component that will provide a count of call centre dial-ins in our Workspace. To create this:&#x20;

1. Search for **Event Type.**
2. Drag the `Event Type` variable onto the Components canvas, into the **Metrics** panel
3. You will see a 'Duplicate field' warning, select **Add anyway.** The `Event Type` component will be added at the top of your metrics.
4. Click on this new component, we will alter the settings in the right hand panel.
5. Add the component name: `Event: Call center dial-ins`
6. Scroll down and expand **Include Exclude Values.**
7. Check **Set include/exclude values.**
8. For the **criteria**, specify **Equals&#x20;**`callcenter.dialIns`

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab3Cja/Screenshot2023-08-03at00.05.14.png)

This condition will ensure this variable when used in a Workspace, will only include only a count of events that have an EventType value of callcenter.dialIns.&#x20;

We can repeat this for all of our possible events; ad clicks, email deliveries, call centre dial-ins, offers viewed, etc.

### Create Derived Fields

This feature helps you improve the quality and accuracy of data in your projects due to data errors or gaps.&#x20;

Example use cases include:&#x20;

- Configure a derived page name field that corrects page name values that were improperly collected.
- Configure a derived marketing channel field that determines the proper marketing channel based on one or more conditions, such as URL parameter, page URL, or page name.

Derived fields can save a significant amount of time and effort, compared to transforming or manipulating your data in other locations outside of Customer Journey Analytics. Such as [Data Prep](https://experienceleague.adobe.com/docs/experience-platform/data-prep/home.html?lang=en), [Data Distiller](https://experienceleague.adobe.com/docs/experience-platform/query/data-distiller/overview.html?lang=en), or within your own Extract Transform Load (ETL) / Extract Load Transform (ELT) processes.

As an example, we will create a derived field to give friendly names to our Dataset IDs. Using the standard `Platform Dataset ID` field, derived fields allow for any custom string value friendly name identifier to be additively set as a component dimension.

This is the mapping between Dataset ID and Dataset name:

| **Dataset ID**           | **Dataset Name**              |
| ------------------------ | ----------------------------- |
| 65088fb9f3e88f28d3706ce3 | Event Dataset for Call Center |
| 65044f2252b55b28d359f2d3 | Event Dataset for Mobile App  |
| 650435bbd080d828d2ae43e4 | Event Dataset for POS         |
| 6504359a8b64cc28d3890b38 | Event Dataset for Website     |
| 650435ade053ca28d1dc4edb | Profile Dataset for CRM       |



1. From your Data view, select **Create derived field** from the left rail.
2. To define your derived field, select the **Case When** function from the functions list, and drag this onto the canvas.
3. Within the "If" section, open the **Value** dropdown list, search for "Platform Dataset ID" and click on the item.
4. In **Criterion**, select Equals.
5. For the **Value**, pick a dataset ID from the table above.
6. Within the "Then set value to", open the **Value** dropdown list and select **Custom string value**.
7. In the **Custom string value** field, type the corresponding **Dataset Name** from the table above.
8. In the Rule configure the following settings:&#x20;

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab3Cja/Screenshot2023-08-03at00.24.25.png)

1. You can continue to add rule conditions for all of your Datasets into this derived field. Do this by selecting **Add Condition** on the canvas.
2. Name your **Field** in the Field settings in the right hand rail.&#x20;
3. Click **Save.**

:::hint{type="success"}
You have now created a new derived field, you can now drag this into your Component Dimensions list.
:::

Once you have added all the necessary **components** to your data view, click **Save and continue.**

## Data View Settings

You should be redirected to the Data view settings screen.

In this tab, you can modify some important settings to change how data is processed. Let’s start by setting the **Session Timeout** to 30 min. Thanks to every experience event’s timestamp you can extend the concept of a session across all channels. For instance, what happens if a customer calls the call center after visiting the website? Using custom Session Timeouts you have lots of flexibility in deciding what a session is, and how that session will merge data together.&#x20;

In this tab you can modify other things like filtering the data by using a segment/filter. You won’t need to do that in this exercise.

- In this case, we will keep the default settings.
- Once you are done, click **Save and finish**.

:::hint{type="info"}
You can come back to this Data View afterwards and change settings and components at any time. Changes **will** affect how historical data is shown.
:::

