7.00.02 - XMLRelation Arguments - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
TextColumn
Specifies the name of the input table column that contains the XML documents. The function skips malformed XML documents.
DocIDColumns
Specifies the names of the input table columns that contain the identifiers of the XML documents. No docid_column can have the same name as an output table column. For output column names, see Output.
MaxDepth
[Optional] Specifies the maximum depth in the XML tree at which to process XML documents. The MaxDepth and Output arguments determine the schema of the output table, and the number of columns in the output table must not exceed 1600. Default: 5.
ExcludeElements
[Optional] Specifies the paths to the nodes to exclude from processing. The function excludes each specified node and its child nodes. Examples of paths to nodes are:
  • 'chapter'
  • 'root/book'
  • 'root/book/{author,chapter}'
AttributeAsNode
[Optional] Specifies whether to treat the attributes of a node as its child nodes. Default: 'false' (attributes of a node are stored in one element of the output tuple).
AttributeDelimiter
[Optional] Specifies the delimiter used to separate multiple attributes of one node in XML documents. Default: ',' (comma).
Output
[Optional] Specifies the output table schema (see Example 1: Output Three Different Output Table Schemas). The MaxDepth and Output arguments determine the schema of the output table, and the number of columns in the output table must not exceed 1600. Default: 'fullpath'.
ErrorHandler
[Optional] Specifies whether the function handles errors that occur when parsing an XML document. Default: 'false' (the function aborts and throws an exception).

If you specify 'true':

  • If an error occurs while parsing a row, the function skips that row. When the function completes the parsing, it outputs only the nodes that were error-free.
  • You can tell the function to output an additional column named output_column and populate it with the values of the specified columns. In the output column, the values of the specified columns are separated with semicolons.

    For example, the following argument adds the column error_info to the output table and populates it with the values of input columns col1 and col2 (with a semicolon after each value):

    ErrorHandler('true;error_info:col1,col2')

    Default: output_column is ErrorHandler.

Accumulate
[Optional] Specifies the names of input column names to copy to the output table. No accumulate_column can have the same name as an output table column. For output column names, see Output.