Key management and unicity key-management

In the context of an Enterprise (FFDA) deployment, the primary key is a Universally Unique IDentifier (UUID), which is a string of characters. To create this UUID, the main element of the schema must contain the autouuid and autopk attributes set to true.

Adobe Campaign v8 uses Snowflake as the core Database. The distributed architecture of the Snowflake database does not provide a mechanism to ensure the unicity of a key within a table: end-users are responsible for key consistency within the Adobe Campaign database.

Avoiding duplicates on keys, and especially on primary keys, is mandatory to preserve relational database consistency. Duplicates on primary keys lead to issues with data management workflow activities such as Query, Reconciliation, Update data, and more. This is critical to define proper reconciliation criteria when updating Snowflake tables.

CAUTION
Duplicated keys are not restricted to UUIDs. It can happen with IDs, including custom keys created in custom tables.

Unicity Service unicity-service

Unicity Service is a Cloud Database Manager component which helps users preserve and monitor the integrity of unique key constraints within Cloud Database tables. This allows you to reduce the risk of inserting duplicate keys.

As Cloud Database does not enforce unicity constraints, Unicity Service reduces the risk of inserting duplicates when managing the data with Adobe Campaign.

Unicity workflow unicity-wf

Unicity Service comes with a dedicated Unicity alerting built-in workflow, to monitor unicity constraints and alert when duplicates are detected.

This technical workflow is available from the Administration > Production > Technical workflows > Full FFDA Unicity node of Campaign Explorer. It must not be modified.

This workflow checks all custom and built-in schemas to detect duplicated rows.

Unicity alerting (ffdaUnicity) workflow: schema checks, Duplicated rows detected test, Alert, End and Cleanup activities

If the Unicity alerting (ffdaUnicity) workflow detects some duplicate keys, they are added to a specific Audit Unicity table, which includes the name of the schema, the type of key, the number of impacted rows, and the date. You can access duplicated keys from the Administration > Audit > Key Unicity node.

Key Unicity list with Schema Id, Key Definition, Key Type, Duplicated Value, Duplicated Count, Creation Date

As a Database Administrator, you can use a SQL activity to remove the duplicates or contact Adobe Customer Care for more guidance.

Alerting unicity-wf-alerting

A specific notification is sent to the Workflow Supervisors operator group when duplicated keys are detected. The content and the audience of this alert can be changed in the Alert activity of the Unicity alerting workflow.

Alert activity in Unicity alerting, assigned to the Workflow supervisors group with the duplicated keys message

Additional guardrails duplicates-guardrails

Campaign comes with a set of new guardrails to prevent insertion of duplicated keys in the Snowflake database.

NOTE
These guardrails are available starting Campaign v8.3. To check your version, refer to Campaign v8 compatibility matrix

Delivery preparation remove-duplicates-delivery-preparation

Adobe Campaign removes automatically any duplicated UUID from an audience during delivery preparation. This mechanism prevents any error from happening while preparing a delivery. As an end-user, you can check this information in the delivery logs: some recipients can be excluded from the main target because of duplicated keys. In that case, the following warning is displayed: Exclusion of duplicates (based on the primary key or targeted records).

Delivery log with the line Exclusion of duplicates (based on the primary key of targeted records) highlighted by an arrow

Update data in a workflow duplicates-update-data

In the context of an Enterprise (FFDA) deployment, you cannot select an internal key (UUID) as a field to update data in a workflow.

Update data activity with the field selector for Recipient (nms), where no internal key field can be selected

Query a schema with duplicates query-with-duplicates

When a workflow starts running a query on a schema, Adobe Campaign checks if any duplicated record is reported in the Audit Unicity table. If so, the workflow logs a warning as the subsequent operation on the duplicated data should potentially impact workflow result.

Workflow log with the warning Unicity constraint violated. Duplicated data found on schema nms

This check is performed in the following workflow activities:

  • Query
  • Incremental Query
  • Read list
NOTE
If you are transitioning from another Campaign version, it is imperative to remove duplicates, troubleshoot and sanitize data to avoid impacting your transition.
recommendation-more-help
campaign-help-v8