This stored procedure is used for XML shredding (extracting values from XML documents to be used to populate the database).
The shredding procedure processes in a streaming fashion (the whole document is not loaded into memory all at once) each of the documents returned by evaluating the SQL query specified by queryString. The annotated schema is used to extract the values of interest from each of the documents and the target tables are updated using these values. During this process, if an externalContext is specified, any configuration values specified are used to override equivalent parameters in the annotated schema mapping.
The AS_SHRED_BATCH stored procedure is created under the user TD_SYSXML.
The user invoking this stored procedure must have the following privileges:
- EXECUTE PROCEDURE on TD_SYSXML
- SELECT privilege on the staging table
- GRANT ALL (Insert/update/delete/upsert) on the target tables