---
title: Data Views
slug: va2024/data-views
docTags: 
createdAt: 2024-05-12T18:31:44.682Z
---

Data views control how the data ingested into a CJA Connection is to be interpreted.  They specify all of the dimensions and metrics which will be available for reporting within Analysis Workspace and which columns those dimensions and metrics obtain their data from.  Data views are defined in preparation for reporting in Analysis Workspace.   Each connection can have multiple Data views. &#x20;

In this exercise you'll learn:

- How to create a new data view
- How to configure the dimensions and metrics
- How to create derived fields&#x20;

First, use the solution switcher to open Customer Journey Analytics&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/JdnAWBfoj8T8XBkZ_nQqU_image.png)

### Create a Data View

Browse to the Data views tab.  Click to **Create new data view.**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/WZY0YN8MjI-jBK_UN0Ire_image.png)

Set the **connection** to use **CID release 5 (Nov 15 - Jan 15 2024). &#x20;**&#x54;his controls what data will be available.  Give your data view a unique name to distinguish it eg. `[your initials - HOL Data View]`

Set the **Timezone** and click **Save and Continue. &#x20;**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/41yk0mrgq1vPbxxxNNB4b_image.png)

### Add Dimensions and Metrics

The next step is to add metrics and dimensions to your data view.  There are some default dimensions and metrics already loaded.   CJA supports three types of data, profile data (attributes about your customer such as loyalty tier, NPS scores, address and age), event data (coming from multiple channels) and lookup data.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/5DyMpa8Ae9YqV9Iu6htrR_image.png)

This is where the design of your XDM schemas is important.  Search for **Productid&#x20;**&#x61;nd look at the details of the **Event datasets&#x20;**-> **Product ID&#x20;**&#x66;ield.  You can see that this attribute is found in multiple datasets - this allows the same dimension to be reported on consistently across multiple channels.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/nMcrxJfuWRS2zeRL3tgNp_image.png)

Drag the **ProductID** field into the dimensions.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/CFbLXtthUWteDqUvQlrN1_image.png)

Product ID is a good example of a field that is likely to have a lookup table associated with it to provide user friendly values for reporting.   You can see multiple **Lookup dataset&#x20;**&#x61;ttributes available in this connection, there are two specific for the Travel industry.  Drag the **Travel Hotel Product ID&#x20;**&#x61;nd the **Travel Flight Product ID&#x20;**&#x4C;ookup fields into the list of available dimensions.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/5ZWwkVop6JlFNZF4e-Bls_image.png)

Metrics are anything that can be counted.  For example search for **Call&#x20;**&#x61;nd you will find the **Call Center Calls&#x20;**&#x61;ttribute from the call center dataset, this is a long type value which will store the value 1 for every call. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/hAbXhb4EuEcaSKFEDzixJ_image.png)

Drag it into the metrics list to add it as an available metric.  Update the component name on the right hands side to **Calls.&#x20;**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/4U5vggoABj7IWnDY4t5EJ_image.png)

### Create a new metric from a dimension

This is great, but what if we forgot to add a specific event field for the metric we want to report on?    Customer Journey Analytics let's you create new metrics from dimensions.  For example if we know that the call reason **"callreasonid:259051"** means it was a complaint we can use this to create a new metric.  Drag the **call\_reason** field into the metrics, update the component name to **Complaints.   &#x20;**&#x55;nder the component settings scroll down to **INCLUDE EXCLUDE VALUES&#x20;**&#x61;nd set the metric to include only values that equal **callreasonid:259051.  &#x20;**&#x57;e now have a new metric to report complaints separately from other call reasons. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/3Cff1FrMNSLTV_3rgOjqg_image.png)

### Set Dimension persistence&#x20;

For some dimensions we want to persist their values across multiple events, previously in Adobe Analytics this persistence needed to be configured upfront and would be applied at ingestion time.  So modifying this after the data has loaded was not an option.   In Customer Journey Analytics we set persistence in the dataview and this is applied at run time, allowing changes to be applied retroactively.&#x20;

Search for the **Marketing Channel&#x20;**&#x61;ttribute and pull this into your dimensions.   Scroll to the bottom of the dimension properties and set the persistence to Most Recent for the session.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/NLjhifpy2dOuT0FC8tL_R_image.png)

### Derived Fields

One of the most powerful features of Customer Journey Analytics is Derived fields.  These allow you to **instantly and retroactively apply complex data changes on-the-fly**, without the need to rewrite and re-ingest data.  Historically this type of data update in Adobe Analytics would incur significant cost and take time reducing your ability to generate insights quickly.

Imagine the website team made an error when coding the data layer for the mobile website, and now all of the pageNames coming from this version of the site are pre-fixed with "mobile web".    &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/jBtW597HAOqf3kMvyL33B_image.png)

But you want to report on category pages across all versions of the website.  We can quickly fix this using derived fields.   Click to **create a derived field**. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/GTnkV6lmzX8uLo1i3eOSe_image.png)

You can see there are a number of **functions&#x20;**&#x61;vailable.   For this use case, we're going to use the **regex\_replace&#x20;**&#x66;unction to create a new pagename field that removes "mobile web" from the start of any value.   Drag the **regex\_replace&#x20;**&#x66;unction into the canvas.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/i00q-CcGb9rgzIPUXNYCo_image.png)

Select the **PageName** attribute from your **Event** schemas.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/dYmlQEMgRdHTkHmpxUVQO_image.png)

Set the **regex** pattern to `(mobile web\:)(.*)` and the **output format** to `$2`.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/UNrHrQMQZslpb9RcXrHtK_image.png)

Give your new field a name that's unique to you, eg. `gillies - pagename derived`. *(derived fields are applied to the connection itself not specifically the data view, so we can't all create the same derived field on this connection). &#x20;*&#x43;lick to **Save. &#x20;**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/6VVWb2XCVc7maAGMB-yZB_image.png)

Lastly, drag your newly created field into your dimensions list.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/S_qEYyeZ6BkzObdHg_rq-_image.png)

### Configure session timeout and filtering

Click to **Save and Continue.  &#x20;**&#x54;his will take you to the data view settings page.  Here you can specify any filters that you want applied to your data across the entire connection.   As well as the session time out period.    For now we can leave this at 30 mins. &#x20;



![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/CUDfhI8aH6CZ2HOb_f40y_image.png)

Click **Save and finish**

:::hint{type="success"}
Congratulations, you've created your first Data View in Customer Journey Analytics.
:::



