Create a campaign logs schema and dataset in Adobe Experience Platform

Last update: 2023-09-22
  • Created for:
  • Experienced

Learn how to create a schema and dataset in Adobe Experience Platform that can be used to ingest campaign logs data into Platform.


In this video, we’re going to learn how to create an Experience Data Model, or XDM schema, within Adobe Experience Platform that can be used for importing campaign log data. Experience Platform uses schemas to describe the structure of data in a consistent and reusable way. By defining data consistently across systems, it becomes easier to retain meaning and therefore gain value from data. Before campaign logs data can be ingested into Platform, a schema must be composed to describe the data structure and provide constraints to the type of data that can be contained within each field. To create the schema, we’ll be using the Experience Platform UI.

To begin, we select Schemas from the left navigation and then select Create Schema in the top-right corner. In order to create a schema, we must select the class upon which the schema will be based. Because campaign log data refers to the behavior of our users and these users are already in profile, we will select the XDM ExperienceEvent class for our schema. After selecting a class, the schema builder opens and the add field groups dialog appears. A field group defines one or more fields within the schema that implement certain functions, such as personal details, hotel preferences, or addresses. Adobe provides many standard field groups and supports the creation of custom field groups. For this example, we will create a custom field group to capture our campaign log data. To begin creating a custom field group, select Create new field group at the top of the Add field groups dialog. We will need to give our field group a name, in this case Campaign Log fields, and can optimally provide a description. Descriptions are recommended to help members of your organization distinguish between multiple field groups that may have similar names. Select Add field group to continue, and you’ll be taken to the schema builder. From here, we select the top level name of the schema, and under Schema properties on the right-hand side, give our schema a name, Campaign log data.

This updates the structure of the schema automatically. From here, we select the Campaign log fields field group in the Composition section, and then select the plus sign next to the name of our schema in the Structure section.

This creates a new area under Campaign log data namespaced to our organization. In this case, it says tech marketing demos, but your organization’s namespace will show here instead, which is typically a company name proceeding by an underscore. The new field will serve as the beginning of our campaign log data. We will you use this field, labeled New field, to create an object into which the rest of our log fields will be added. By selecting the new field, we can edit the field properties to name this field Message with a type of object. The field name should be written in camel case, which is lowercased first letter for the first word and capitalized first letter for any additional words, and no spaces.

The display name should be written in title case, capitalizing all key words. And the type is selected from the dropdown based on the field type. For more information on field types, see the XDM documentation available on Experience League.

When we select Apply, the structure is updated to show the new message field with a type of object.

Then we select the plus sign next to the message to begin adding additional fields. Each field requires a field name, display name, and type.

Select Apply after entering the properties for each field and the structure of the schema updates in real time.

With the Campaign log fields field group completed, select Add in the field groups composition area to add another field group. This opens the Add field group dialog, where, again, we will select Create a new field group.

This field group is designed to capture the recipient’s information. So we will name it Campaign recipients field. Selecting Add field groups returns us to the schema editor where we can add fields to our new field group.

With our new field group selected, select the plus sign next to the top level element of the schema. This adds another new element to our namespace.

We will name this element Recipient and make it an object as well. Then we will add the rest of the recipient fields into this object.

The nested fields are created by selecting the plus sign next to recipient and then adding the field name, display name, and type for each field as shown. After adding the message and recipient field groups, we can save our schema and continue with adding a dataset. You should receive a Schema saved successfully pop up when your schema is saved.

Now that our schema has been created, we are ready to create a dataset based on that schema to store our campaign logs data.

All data that is successfully ingested into Experience Platform is persisted within the data lake as datasets.

A dataset is a storage and management construct for a collection of data that uses an XDM schema to define the format and structure of the data that the dataset can store. Attempting to upload data to a dataset that doesn’t conform to the XDM schema will cause ingestion to fail. To create a dataset, we need to select Datasets in the Platform left navigation and then select Create dataset from the top-right corner. We will then select to create a dataset from a schema because we want to use the campaign log schema that we just created. We can either select the schema by scrolling through the list of schemas that our organization has created, or we can use the search to easily find our campaign logs data schema. To choose a schema, select the radio button next to the schema name, and then select Next to proceed.

We are then required to provide a name for a dataset as well as provide an optional description before selecting Finish to complete the workflow and save our dataset.

Our dataset has now been saved to Platform. However, there is no dataset activity yet. This is to be expected as we have not started ingesting data into Platform using this dataset.

After watching this video, you should now have a campaign log data dataset within Platform based on your campaign log data schema. In a subsequent video, we will ingest data using a source connector in Platform to update our profile data with our exported campaign logs. Thanks for watching. -

On this page