Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Atualizado 04/11/2024
Send us feedback
xpath_number
Applies to: Databricks SQL Databricks Runtime
Returns a DOUBLE value from an XML document.
xpath_number(xml, xpath)
xml: A STRING expression of XML.
xml
xpath: A STRING expression that is a well formed XPath.
xpath
A DOUBLE.
The result is zero if no match is found, or NaN if a match is found but the value is non-numeric.
NaN
The function raises an error if xml or xpath are malformed.
> SELECT xpath_number('<a><b>1</b><b>2</b></a>', 'sum(a/b)'); 3.0
xpath function
xpath_boolean function
xpath_float function
xpath_int function
xpath_long function
xpath_double function
xpath_short function
xpath_string function