- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error when trying to load Nested JSON file using Ambari > Hive View> Upload Table :E090 Row data cannot have an array. [IllegalArgumentException]
- Labels:
-
Apache Ambari
-
Apache Hive
Created 01-10-2017 04:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to upload a simple JSON using Upload Table in Ambari>Hive View I am able to do it.
When I try to upload a nested JSON ( containing one or more different arrays ), I get "E090 Row data cannot have an array. [IllegalArgumentException]."
I am beginning to wonder if Upload Table supports loading complex nested JSON.
Attached complex.txt file that I am trying to load. Please rename it to .json if you want to replicate the issue.
Thank you.
Created 01-12-2017 10:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is confirmed that nested objects are not supported in JSON via Upload Table function.
Here is an excerpt from official documentation:
The following json format is supported: [ { "col1Name" : "value-1-1", "col2Name" : "value-1-2"}, { "col1Name" : "value-2-1", "col2Name" : "value-2-2"}]
The file should contain a valid json array containing any number of json objects. Each json object should contain column names as property and column values as property values. The names, number and order of columns in the table are decided from the first object of the json file. The names and datatype of column can be edited during the preview step. If some json objects have extra properties then they are ignored. If they do not have some of the properties then null values are assumed. Note that extension of files cannot be “.json”
Created 01-10-2017 04:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Pardeep @vsithannan - Appreciate any inputs from you guys. I have tried to find the answer on multiple forums to no avail and I am finally posting it here.
Created 01-12-2017 10:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is confirmed that nested objects are not supported in JSON via Upload Table function.
Here is an excerpt from official documentation:
The following json format is supported: [ { "col1Name" : "value-1-1", "col2Name" : "value-1-2"}, { "col1Name" : "value-2-1", "col2Name" : "value-2-2"}]
The file should contain a valid json array containing any number of json objects. Each json object should contain column names as property and column values as property values. The names, number and order of columns in the table are decided from the first object of the json file. The names and datatype of column can be edited during the preview step. If some json objects have extra properties then they are ignored. If they do not have some of the properties then null values are assumed. Note that extension of files cannot be “.json”
