1

I have to extract timeStamp column from this Array in HIVE? [{"timeStamp":1506411499989,"status":"BROADCASTED"}]

Etisha
  • 307
  • 6
  • 16

2 Answers2

0

Use explode function and then select the timestamp from the exploded table/view

0

Use lateral view+explode and get_json_object:

select s.*, get_json_object(a.your_json,'$.timeStamp') as timeStamp
  from your_table s
       lateral view outer explode (your_Array) a;
leftjoin
  • 36,950
  • 8
  • 57
  • 116