16.20 - Error Handling in XML Batch Shredding Stored Procedures - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ NewSQL Engine Release Summary

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Release Notes
featnum
B035-1098-162K

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.

Benefits

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.

Considerations

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.

Additional Information

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.