---
title: Data Views
slug: nabcja/data-views
docTags: 
createdAt: 2024-07-24T01:27:44.425Z
---

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)

### Review your Data View

Browse to the **Data views** tab.   Search for **Admin HOL**. There will be a data view available which is specific to your lab user number, for example if my user number is **01** the data view I will use today is **Admin HOL Dataview 01.  &#x20;**

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

Click to open your Data View.   You can see the connection is set to **CID Release 5 -&#x20;**&#x74;his connection contains data from November 15 2023 - January 15 2024.    On the configure tab you can control the time zone as well as the default container names.   &#x20;

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

Click to **Components&#x20;**&#x74;ab.  This is where you can configure the dimensions and metrics for your view.   The available fields are on the left, the included components are in the middle and the detail of each component is shown on the right when you select one of the included components.  &#x20;

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

###

### Add a Dimension

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.   For this exercise, let's add a lookup attribute as a dimension into our data view.   &#x20;

Click into the **Lookup datasets&#x20;**&#x69;n the left hand panel.

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

One of the datasets included in the connection comes from the call center.   A call reason is recorded for every inbound call event, this reason is stored as generic ID that needs to a user friendly description for reporting.   This is where the lookup datasets come in handy.    Search for **call&#x20;**&#x79;ou'll notice we have different lookup values depending on the industry, drag the **FSI\_Call\_Center&#x20;**&#x61;ttribute into the Dimensions.&#x20;

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

Now, let's update the dimension properties on the right hand side and rename the dimension to **Call Reason. &#x20;**

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

### Add a Metric

Metrics are anything that can be counted, these are usually collected as boolean type (1/0) flags in our Event datasets.  &#x20;

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 hand-side to **Calls.&#x20;**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/4U5vggoABj7IWnDY4t5EJ_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.  &#x20;

:::hint{type="info"}
Global filters can be helpful for use cases where democratisation of data is required.  For example you can create a data view for a specific brand or business unit and add a filter to include only events from that brand/unit without needing to ingest the data via two separate connections. &#x20;
:::

You can also set 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 updated your first Data View in Customer Journey Analytics.   Let's create a quick project to test it out.&#x20;
:::

### Use your Data view

Click to the **Workspace** in the top navigation and **create a new project**. &#x20;

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

Ensure that you've selected your Data View in the Data View selector. &#x20;

Set Reporting Date Range to **Dec 15 2023 - Jan 15, 2024** from table below and click **Apply**.

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

Drag the **events, sessions** and **people** metric into your freeform.  Change the dimension to **Week&#x20;**&#x74;o verify that you have data displaying for your new dataview. &#x20;

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

Swap the Week dimension for **Campaign Name** and add the **Total Applications&#x20;**&#x6D;etric.  &#x20;

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

You'll notice that there are no campaign names aligned to application events, regardless of channel.  That's to be expected because the campaign name is collected when a customer first lands on the website and we haven't yet set the persistence for this dimension.  &#x20;

### Set Dimension Persistence&#x20;

Previously in Adobe Analytics persistence needed to be configured up front 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;

Click to edit your dataview, you can do this directly from your project by clicking the edit icon in the dataview selector:&#x20;

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

Switch to the **Components&#x20;**&#x74;ab and search for the **Campaign Name** in your dimensions.   Scroll to the bottom of the properties for this component and enable **Persistence.  &#x20;**&#x53;et the persistence to **Most Recent** for the **session**.  &#x20;

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

Click **Save**.  Then click **Close&#x20;**&#x74;o return to your dashboard.

You can see there are now campaigns associated with your application events:&#x20;

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

### Create a new metric from a dimension

Another advantage to this on-the-fly processing allows us to create new metrics from dimensions.  What if we forgot to add a specific event field for the metric we want to report on?   For example if we know that the call reason **"callreasonid:347213"** means it was a complaint we can use this to create a new "complaints" 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:347213.  &#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/LSi5ZykGez_7N_mju64zq_image.png)

Drag the new **Complaints&#x20;**&#x6D;etric into your freeform and change the dimension t&#x6F;**&#x20;Call Reason:**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/F8AuiYA4iPu1P5QOXGKGg_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 page names coming from this version of the site are pre-fixed with "**mobile web:**".    &#x20;

On your dashboard, change the dimension to **Page Name,&#x20;**&#x61;pply a filter on the list to include only page names including the word **insurance.  &#x20;**&#x59;ou can see that we're reporting mobile web pages separately to desktop which is not the desired state.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/ZD-0BK-TuwSjXSPH4EZ8j_image.png)

You want to report on category pages across all versions of the website.  We can quickly fix this using derived fields.   Click to edit your dataview and **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 **FSI\_Insurance\_Pages** attribute from your **Event** schemas (this is already a lookup value in this connection but let's use it anyway for demonstration purposes).

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

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

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/YnDJkQcioO_SwMASeyrjC_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/VtSyKTZKT9qYoiS66jGaB_image.png)

Drag your newly created field into your dimensions list.

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

Click **Save. &#x20;**&#x43;lic&#x6B;**&#x20;Close** to return to your project.

Replace the page name dimension with your new derived field, values are now reported together.

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



:::hint{type="success"}
Congratulations you've completed the exercise on Data Views.
:::

