Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive query output as JSON


Hive query output as JSON

New Contributor

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 ?