Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Nov 22, 2024
Send us feedback
xpath
Applies to: Databricks SQL Databricks Runtime
Returns values within the nodes of xml that match xpath.
xml
xpath(xml, xpath)
xml: A STRING expression of XML.
xpath: A STRING expression that is a well formed XPath.
An ARRAY of STRING.
The function raises an error if xml or xpath are malformed.
> SELECT xpath('<a><b>b1</b><b>b2</b><b>b3</b><c>c1</c><c>c2</c></a>','a/b/text()'); [b1, b2, b3]
xpath_boolean function
xpath_double function
xpath_int function
xpath_long function
xpath_number function
xpath_short function
xpath_string function