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

How do i export Hive columns values as JSON (file)

How do i export Hive columns values as JSON (file)

New Contributor

One of my hive table having 2 columns values are stored as string (but it was extracted from JSON file). I wanted to transform it back and export it as JSON file (combining all the records).

 

Please provide your suggestions.

2 REPLIES 2

Re: How do i export Hive columns values as JSON (file)

Champion

You can also create a new temp table with JSON file format and export it back . 

Highlighted

Re: How do i export Hive columns values as JSON (file)

New Contributor

thanks guna. really appreciated with your quick response.  While trying the same, noted the following issues 

1. if there are multiple columns to export, then each column is being separated by | symbol as well (along with comma), which was unable to remove

2. the table data exported into multiple splits files, but the expected output is a single file.

3. if any one of the tag values are null, which are not being shown in the output 

 

do you have any thoughts on this? how to handle these issue?