Convert XML Data to Relational Data | XML Data Type | Teradata Vantage - Converting XML Data to Relational Data - 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ā„¢
You can use the XMLTABLE function to convert an XML tree structure into zero or more rows:
  1. Compose an XQuery query that will generate a sequence. Each item of this sequence will generate a corresponding row.
  2. Determine the row format (column name, type of all the columns) and determine the path expression that will return the value of the column. The path expression should be relative to the items returned by the query in step (1).
  3. Compose a query which calls the XMLTABLE function to turn the XML documents into rows.