Member since
11-13-2017
2
Posts
0
Kudos Received
0
Solutions
11-13-2017
03:24 PM
Oh god, thank you.
... View more
11-13-2017
12:41 PM
I am trying to query the following Json file: {"a":"a1","b":"b1","d":"{"key1":"pair1","key2":"pair2"}"} I have created the following table to query it: CREATE EXTERNAL TABLE database.testingjson(
a STRING,
b STRING,
c STRING,
d map<string,string>
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
STORED AS TEXTFILE
LOCATION 'location';
Shows the following exception: SQL Error: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
java.io.IOException: Start of Object expected
java.io.IOException: Start of Object expected If I delete the map from the table there is no problem and queries the data correctly. Is there anything that I'm missing? Or the hcatalog doesn't accept key value fields? I'm using Hive 1.2
... View more
Labels:
- Labels:
-
Apache HCatalog
-
Apache Hive