In batch mode shredding of XML documents using the AS_SHRED_BATCH or XSLT_SHRED_BATCH stored procedures, the default behavior of these procedures is to abort the shredding process and return an error if an individual document in the batch fails to shred properly.
This feature allows users to invoke AS_SHRED_BATCH and XSLT_SHRED_BATCH with a more permissive mode of shredding in which the stored procedure will not abort when any document in the batch fails to shred. Instead, the stored procedure will write the document IDs of the failed documents and corresponding error messages to an error table specified by the user. After documenting an error, the stored procedure continues shredding the remaining documents in the batch.
Provides users with the flexibility to continue shredding a batch of documents even when errors are encountered with individual documents in the batch. Therefore, users do not have to resubmit the entire batch of documents for shredding after a failure.
XML batch shredding is done in two phases. In the first phase, all the documents in the batch are shredded to a volatile table, and in the second phase, data is transferred from the volatile table to the target tables. During the first phase, if any document fails to shred for any reason, the document ID and the error message corresponding to the failure are written to the error table. This allows the stored procedure to continue shredding the remaining documents in the batch. If, however, an error occurs in the second phase (while moving data from the volatile table to the target tables), the shredding procedure will still abort without writing to any of the target tables.
For more information about using the AS_SHRED_BATCH or XSLT_SHRED_BATCH stored procedures to shred XML documents, see Teradata Vantage™ XML Data Type, B035-1140.