Unified_Changes_PKS Table

The Unified_Changes_PKS table contains a history of changes to primary keys, relative to the previous Stitch run.

The Unified_Changes_PKS table is automatically added to the Stitch QA database as a passthrough table when it is generated using the “Stitch QA” database template.

Note

Thirty days of history are stored by defaut for the Unified_Changes_Clusters and Unified_Changes_PKS tables. This number of days is configurable.

Use with Stitch QA

Use the Unified_Changes_PKS table as part of the Stitch QA process to compare the previous state of primary keys to the current state and understand why a primary key was added, deleted, reassigned, or updated.

Column reference

The Unified_Changes_PKS table contains the following columns:

Column Name

Data type

Description

amperity_id

String

The unique identifier that is assigned to clusters of customer records that all represent the same individual. The Amperity ID does not replace primary and foreign keys, but exists alongside them within unified profiles.

Note

The Amperity ID is a universally unique identifier (UUID) that is represented by 36 characters spread across five groups separated by hyphens: 8-4-4-4-12.

For example:

123e4567-e89b-12d3-a456-426614174000

amperity_id_prev

String

The Amperity ID that was previously associated with the primary key (pk) as of the most recent Stitch run.

change_type

String

The type of change that occurred within the Stitch job. Possible values include: add, delete, and updated:

  • The added change type indicates a primary key was added to the cluster.

  • The deleted change type indicates a primary key was deleted from the cluster.

  • The updated change type indicates the primary key existed in the past run, and continues to exist in this run but its cluster assignment has changed.

Also in: Unified_Changes_Clusters

datasource

String

The name of the data source from which this customer record originated.

Tip

The combination of pk and datasource uniquely identifies a row in the Unified_Coalesced table, which correlates to a single row in a domain table.

job_id

String

The job ID for database table generation. For example: db-gen-20210202-12345-AbCd67EFgH8.

Also in: Unified_Changes_Clusters

pk

String

The combination of data source and primary key allows Amperity to uniquely identify every row in every data table across the entirety of customer data input to Amperity.

Tip

The combination of pk and datasource uniquely identifies a row in the Unified_Coalesced table, which correlates to a single row in a domain table.

timestamp

Datetime

The timestamp that is associated with job_id. Each row that shares the same job ID will have the same value for timestamp.

Also in: Unified_Changes_Clusters