The purpose of an Exception Datastore is to allow an Apply Engine to remain operational in the event of certain errors. The most common types of errors for which an exception datastore might be used are source data that is incompatible with the target datastore format. The exception datastore can be any datastore type but is most often a file or queue. An exception datastore can be tied to both source and target datastores by the keyword EXCEPTION together with the alias of the exception datastore. Only Relational Target datastores can have an exception datastore while all source datastore types can have an exception datastore.
The syntax for both types of exception datastores are the same, essentially a binary format that will contain either the actual SQL that failed on a Target datastore or a copy of the record from the Source datastore. Precisely generally recommends allowing Source datastore exceptions to fail rather than using an exception datastore due to the complexity of recycling rejected source data. It is often best to revise the Apply Engine script to ensure the exception can be handled and processing simply be restarted. Target exceptions are more likely to be environmental however making them more easily recoverable by simply processing the formatted SQL directly against the Target Relational datastore.
Example:
-- Exception Datastore
DATASTORE file://home/sqdata/exceptions/exception.dat
OF BINARY
AS TARGET_EXP
DESCRIBED BY DUMMY;
-- Oracle Target Datastore
DATASTORE RDBMS
OF RELATIONAL
AS TARGET
DESCRIBED BY GROUP ORA_DDL
EXCEPTION TARGET_EXP;