Troubleshooting perspectives
Here's troubleshooting tips for the process of loading perspectives in a data pool for object-centric process mining.
For object-centric process mining perspectives, join relationships in the data model are generated automatically from the object relationships in the Process Intelligence Graph. This error usually occurs when there are duplicate keys on the “1” side of the specified join.
Solution:
Check the records in the object type or event type table referenced in the error message and in the source system data.
Remove or handle duplicate keys before loading the data:
Filter duplicates during data extraction, or
Remove duplicates during pre-processing.
For instructions on pre-processing raw data before transforming it into objects and events, see: Pre-processing raw data before transforming it into objects and events
The error usually occurs when the listed tables are empty. Verify that the transformation responsible for creating and populating these tables ran successfully and produced data.
This error message names two tables. At least one of these tables should not contain multiple records for the same key - that is, the relationship between these objects should be a 1:n relationship. Follow this procedure to eliminate the duplicates:
Identify the object that is the 1 side of the relationship. For that object, run the following code to identify if the unexpected duplicates are present in your source system data:
SELECT DISTINCT [The raw columns that constitute your Object ID] AS "object_id", COUNT(*) AS "id_count" FROM [The raw tables that constitute your FROM Statement on the object transformation] --ANY WHERE STATEMENT ON THE OBJECT TRANSFORMATION GROUP BY object_id HAVING COUNT(*) > 1
For example, here’s the code to run for the Customer object:
SELECT DISTINCT 'Customer_' || "KNA1"."MANDT" || "KNA1"."KUNNR" AS "object_id", COUNT(*) AS "id_count" FROM "KNA1" GROUP BY "object_id" HAVING COUNT(*) > 1
If this query returns any results, investigate those in the source system. You can use filtering during data extraction to remove unwanted duplicate records, or remove the duplicates in pre-processing. I want to pre-process my raw data before transforming it into objects and events explains how to set up a pre-processing stage.
If the query returns no results, try to join the main object table and the custom attribute table together and check if that query identifies any duplicates:
WITH TMPTABLE AS ( SELECT [Columns that delineate the ID value] AS "object_id" FROM Table) SELECT DISTINCT object_id, COUNT* AS id_count FROM TMPTABLE GROUP BY object_id HAVING COUNT*> 1
If you find duplicates from this query, the issue is likely that multiple custom attribute values are being generated for an individual object instance. These custom attributes are stored in a separate table named
x_custom_celonis_<ObjectName>(in production). This separate table is only joined to the main object table during the data model load. This join could potentially also create the duplicates mentioned in the error message. In this case, review the transformation for the custom attribute and eliminate the duplicates.