【大数据面经-数据仓库-03】常用hivesql udf考察

目录

explode

lateral view explod


说明,关于内置的hive的udf函数使用,建议直接参考hive 官方wiki https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-explode(array)

explode

explode() takes in an array (or a map) as an input and outputs the elements of the array (map) as separate rows. UDTFs can be used in the SELECT expression list and as a part of LATERAL VIEW.

As an example of using explode() in the SELECT expression list, consider a table named myTable that has a single column (myCol) and two rows:

你可能感兴趣的:(大数据面经总结)