Reply
New Contributor
Posts: 1
Registered: ‎05-05-2017

Hive query output as JSON

Created Hive External table as ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'.

 

I am running Hive queries through Java using JDBC connector. I am getting response as Resultset.

want to get JSON response.  

 

One way to get JSON is to iterate over result set and prepare java object which inturn converts to JSON. This looks tedius. 

 

Is there any simpler way to get JSON as response from Hive SQL query ?

 

Thanks,

Naresh.