Hive generally has two directions for processing json data:
-
Enter the entire json into the Hive table as a string, and then use the UDF function to parse the data that has been imported into hive, such as using the
LATERAL VIEW json_tuple
method to obtain the required column names. -
Split json into various fields before importing, and the data imported into the Hive table has already been parsed. This will require the use of a third party
SerDe
.
https://mp.weixin.qq.com/s/awCvlb9BzCRX-Da1_l1FYg
See you next time, bye!