2014-05-21 65 views
2

我工作的蜂房,我創建了一個代碼:HIVE,JSON格式

create table table_tweet_sentiment stored as orc as select()..... 

但當我嘗試執行該條款....失敗!

產生的原因:

org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object - JSONException: Unterminated string 

我試圖用類似的東西:

row format serde 'org.openx.data.jsonserde.JsonSerDe' 
with serdeproperties ("ignore.malformed.json" = "true") 

但我使用ORC左右....我怎麼能解決這個問題。

回答

0

我認爲這個問題可能在你的JSON數據中。你能展示一個樣本嗎? JSON的SERDE 需要一個JSON記錄每行,如果它沒有格式化這樣的話,可能會出現錯誤像JSONException:未結束的字符串