Hive Json extraction field (string format)

get_json_object (column name, '$. sieved required fields')

⬆️ using the above method, all the fields are extracted from the string format.

SELECT get_json_object (COL name in Hive, ' $ .json field ' ) AS <the any name you want>
 from <Hive tables>
 WHERE <partition field may need to add>

If PS is extracted json array, with the need to remove brackets around regular expression, and then explode split field method (may not tried ..

 

God knows why this study. .

 

Guess you like

Origin www.cnblogs.com/GW977/p/11128793.html