schema_of_xml
function
Applies to: Databricks SQL
Databricks Runtime 14.1 and above
Preview
This feature is in Private Preview. To try it, reach out to your Databricks contact.
Returns the schema of an XML
string in DDL format.
Arguments
xmlStr
: ASTRING
expression with aXML
string.options
: An optionalMAP<STRING, STRING>
literal.
Returns
A STRING
holding a definition of an array of structs with n
fields of strings where the column names are derived from the XML
element and attribute names.
The field values hold the derived formatted SQL types.
For details on options, see from_xml function.