Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

I created a table based off the Hive native JSON SerDe. My intention is to create a table for tweets. I've attached tweet-table.txt. The table is created without errors. I then load the data using the LOAD DATA INPATH command and I get no errors. When I try to select data from the table, I get the following error:

{"message":"H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS]","status":500,"trace":"org.apache.ambari.view.hive.client.HiveErrorStatusException: H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS]\n\norg.apache.ambari.view.hive.client.HiveErrorStatusException: H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS

Any suggestions?

1 ACCEPTED SOLUTION

I was adding the wrong jar resource. Thanks for everyone's suggestions. If you want to help further, I'm now encountering this issue https://community.hortonworks.com/questions/31438/getting-all-nulls-when-selecting-from-a-hive-json....

View solution in original post

4 REPLIES 4

Expert Contributor

As i recall is smth related to nested arrays. We're using another JSON serde lib and it does work with any complexity of jsons.

Here i posted an example of twitter table ddl which is tested well.

Regards,

Michael

Mentor

Scott, can you confirm youre having an issue with hive or the hive view? Please run your sql against hive cli or beeline. i have a working example here https://github.com/dbist/workshops/blob/master/hive/JSON/JSON_SERDE.txt

Another thing to keep in mind, switch to 1.2 introduced a clause for reserved keywords, in my example, user is a keyword and I turn the check off. Confirm your schema does not include any reserved words.

Thanks @Artem Ervits but I get the same results from HiveCL. It's all nulls. 9688f87e-f96b-4330-833c-c2e59ab2e9c9.png. Let me try @Michael M suggestion and I'll update the thread with the results.

I was adding the wrong jar resource. Thanks for everyone's suggestions. If you want to help further, I'm now encountering this issue https://community.hortonworks.com/questions/31438/getting-all-nulls-when-selecting-from-a-hive-json....