[hive] 함수 설명 보기
hive 함수를 보려면 다음 명령어를 사용한다.
SHOW FUNCTIONS;
DESCRIBE FUNCTION 함수이름;
DESCRIBE FUNCTION EXTENDED 함수이름;
예)
> DESCRIBE FUNCTION xpath_string;
OK
xpath_string(xml, xpath) - Returns the text contents of the first xml node that matches the xpath expression
Time taken: 0.006 seconds, Fetched: 1 row(s)
> DESCRIBE FUNCTION EXTENDED xpath_string;
OK
xpath_string(xml, xpath) - Returns the text contents of the first xml node that matches the xpath expression
Example:
> SELECT xpath_string('<a><b>b</b><c>cc</c></a>','a/c') FROM src LIMIT 1;
'cc'
> SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a/b') FROM src LIMIT 1;
'b1'
> SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a/b[2]') FROM src LIMIT 1;
'b2'
> SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a') FROM src LIMIT 1;
'b1b2'
Time taken: 0.01 seconds, Fetched: 10 row(s)