JSONParser Syntax Elements - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™
TextColumn
Specify the name of the input table column that contains the JSON string.
Nodes
Specify the parent/child pairs. All pairs must have the same format. You can specify a parent with multiple children with this syntax:
parent_node/{child_node [,…]}
JSON has two format types for arrays:
Array Format Type Nodes Syntax Element
parent:[key:value,key:value] 'parent/key'
parent[value,value] 'parent/parent'
Root sometimes has a key:value pair, as in JSONParser Example: Default Values. To get the value of such a pair, use Nodes syntax element '/key'.
SearchPath
[Optional] Specify the path to find the direct value of the child. To reach the grandparent, include it in this path. When you include the path to the grandparent, you can output all siblings of the parent by including them in the Nodes syntax element. If anything from root is to be parsed, represent it as either '/' or an empty string.
Default behavior: The function does not output the direct values of the children.
Delimiter
[Optional] Specify the delimiter that separates multiple children with the same name and the same parent node in the JSON String.
The delimiter cannot include '#'.
Default: ',' (comma)
MaxItemNum
[Optional] Specify the maximum number of nodes with the same name to display in the output.
Default: 10
NodeIDOutputColumn
[Optional] Specify the name of the column to use in the result schema to contain the identifier (from the input table) of the each node extracted.
Default: 'out_nodeid'
ParentNodeOutputColumn
[Optional] Specify the name of column to use in the result schema to contain the tag name of the parent node extracted.
Default: 'out_parent_node'
Accumulate
[Optional] Specify the names of the input table columns to copy to the output table.
ErrorHandler
[Optional] Specify whether the function continues processing when the input table has bad data (for example, invalid UTF-8 characters) and adds an error column to the output table.
Default: 'false' (The function aborts when the input table has bad data.)
The name of the error column is output_column.
Default: ERROR_HANDLER
The error column contains the data from each specified input_column, separated by semicolons. If you specify no input_column, the error column is empty.