Error Analysis Using SQL
Statuses, including error statuses, are recorded for all items and actions in the Data Hub database. You can thus easily query the database using standard SQL statements to view any errors.
The following tables in the Data Hub database contain statuses and error details:
| Table | Phase | Contains |
|---|---|---|
| DataLoadingAction | Load and Composition | The end status of a completed data loading action |
| RawItem | Load and Composition | The current status of each raw item |
| CompositionAction | Composition | The end status of a completed composition action |
| CanonicalItem | Composition | The current state of each canonical item, along with (error) status details |
| PublicationAction | Publication | The end status of a completed publication action |
| TargetSystemPub | Publication | The end status of a completed target system publication |
| CanItemPubStatus | Publication | The publication state of each canonical item upon completion of the publication action (per target system) |
| PublicationError | Publication | Details of any publication errors |
Note that not only the status, but also the details of any error, is available for each item in both the composition and publication phases.
Using the Data
For example, to view the details of all failed compositions for a specific composition action, you might construct a query something like the following:
select id, integrationkey, itemtype, typecode, modifiedtime, compositionaction, datapool, creationtime, status, compositionstatusdetail from CanonicalItem where compositionaction=1 and status='ERROR';
From a result like the following, you could easily deduce that the lack of an integration key has resulted in the composition failure. Such a situation may produce the error INVALID_PRIMARY_KEY.
+----+----------------+------------------+----------------------------+---------------------+-------------------+----------+---------------------+--------+-------------------------+ | id | integrationkey | itemtype | typecode | modifiedtime | compositionaction | datapool | creationtime | status | compositionstatusdetail | +----+----------------+------------------+----------------------------+---------------------+-------------------+----------+---------------------+--------+-------------------------+ | 1 | | CanonicalVariant | ManagedCanonicalItemEntity | 2016-02-23 12:08:26 | 1 | 0 | 2016-02-23 12:08:26 | ERROR | INVALID_PRIMARY_KEY | +----+----------------+------------------+----------------------------+---------------------+-------------------+----------+---------------------+--------+-------------------------+ 1 row in set (0.01 sec)