공부
[Hive] get json keys
승가비
2020. 7. 24. 19:44
728x90
SELECT
REGEXP_REPLACE(
REGEXP_REPLACE(json,'\'(\\w+)\': \\w+,', '$1,')
, '[{} ]', '')
FROM json_table
https://stackoverflow.com/questions/39771308/hive-query-to-get-json-keys
hive query to get json keys
I have json as below in hive, each json has different keys, I am thinking to get all keys and use get_json_object to get values. So, Is there hive query get json keys out of it? { "ts":"2016-07-
stackoverflow.com
728x90