I have a hive table like
col1 col2 
id1  value1
id2  value2
id2  value3
I would like to covert it into a list of dictionary like
[{"col1": "id1", "col2": "value1"}, {"col1": "id2", "col2": "value2"}, {"col1": "id2", "col2": "value3"}]
Can anyone suggest what is the simplest way to achieve this?
 
     
     
     
    