Reply
New Contributor
Posts: 2
Registered: ‎07-09-2015

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

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.

Champion
Posts: 753
Registered: ‎05-16-2016

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

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

New Contributor
Posts: 2
Registered: ‎07-09-2015

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

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?

Announcements