目录
Every HTTP URL conforms to the syntax of a generic URI. A generic URI is of the form:
scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
从url返回PROTOCOL
hive> select parse_url('https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=大唐不夜城着火&rsv_idx=2&rsv_dl=fyb_n_homepage', 'PROTOCOL');
OK
https
从url返回HOST
hive> select parse_url('https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=大唐不夜城着火&rsv_idx=2&rsv_dl=fyb_n_homepage', 'HOST');
OK
www.baidu.com
从url返回PATH
hive> select parse