Argument Types and Rules - Advanced SQL Engine - Teradata Database

XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
amr1556233250442.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1140
lifecycle
previous
Product Category
Teradata Vantageā„¢

AS_SHRED_BATCH takes the following input arguments:

  • queryString - an SQL query that returns 2 columns:
    • An ID column
    • A column that contains the XML document to be shredded as an XML data type

      If queryString is NULL, the stored procedure returns a resultCode of 1 without performing any operations.

  • annotatedSchema- an annotated schema that maps the XML document structure to the target tables that will be updated. If annotatedSchema is NULL or is not a valid mapping definition, an error is raised.
  • externalContext - configuration values used to override equivalent parameters specified in the annotated schema mapping. This must be a comma separated list of name=value pairs and the names must match one of the configuration parameters in the annotated schema.
    Currently four parameter values can be set through the externalContext:
    • defaultDatabase
    • defaultEncoding
    • rootElement
    • errorTable

    For explanations of the defaultDatabase, defaultEncoding, and rootElement options, see the description of the corresponding elements in the discussion of Adding Schema Annotations.

    The errorTable option allows you to specify the fully qualified name of a table to which error information will be written if any of the documents fails shredding. Specifying this option activates a more permissive form of shredding in which failure of any individual document during shredding does not result in the abortion of the entire shredding procedure. Instead, the remaining valid documents in the batch are shredded, and the error information for the documents that failed shredding is written to an error table.