JSON/XML Document to Table
This component allows you to automatically convert a JSON or XML document into a data set of rows and columns. This component operates on a column; you can either specify the name of the column or its index. If the pipeline data set contains multiple rows, all the rows will be processed individually and the results will be concatenated into a single output.
This component can be useful if the previous component is an HTTP request returning XML or JSON, and you would like to immediately convert the output into rows and columns for dynamic processing.
The Tx Path is either a XML XPath or JSON Path that points to a starting node. The number of columns generated automatically will be a function of the number of nodes/attributes in the document starting at the path provided and its direct children. For a complete description on how to use this property, see the Document Path documentation.
When specified, the Raw Column will be added at the tail end of the data set with the raw XML or JSON content of the row.
The data type of all columns created by this component will be string
. You can then use the Apply Schema component
to convert to the desired/expected data types.
In this example, the first column (index 0) holds an XML document (as seen in the File Content window). The
/root/item
is the XML Path that points to the node where the data needs to be extracted. After extracting and converting the
XML payload, the original pipeline data set is replaced with the output of this component.