PREHOOK: query: DESCRIBE FUNCTION xpath
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION xpath
POSTHOOK: type: DESCFUNCTION
xpath(xml, xpath) - Returns a string array of values within xml nodes that match the xpath expression
PREHOOK: query: DESCRIBE FUNCTION EXTENDED xpath
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION EXTENDED xpath
POSTHOOK: type: DESCFUNCTION
xpath(xml, xpath) - Returns a string array of values within xml nodes that match the xpath expression
Example:
> SELECT xpath('b1b2b3c1c2', 'a/text()') FROM src LIMIT 1
[]
> SELECT xpath('b1b2b3c1c2', 'a/b/text()') FROM src LIMIT 1
["b1","b2","b3"]
> SELECT xpath('b1b2b3c1c2', 'a/c/text()') FROM src LIMIT 1
["c1","c2"]
PREHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/text()') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/text()') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
[]
PREHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/*/text()') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/*/text()') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
["b1","b2","b3","c1","c2"]
PREHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/b/text()') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/b/text()') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
["b1","b2","b3"]
PREHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/c/text()') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/c/text()') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
["c1","c2"]
PREHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/*[@class="bb"]/text()') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath ('b1b2b3c1c2', 'a/*[@class="bb"]/text()') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
["b1","c1"]