JSONデータをHIVEにロードしようとしています。私はHIVEにあるデフォルトのSERDEを使用しています。テーブルの作成中にエラーが発生しました。ヘルプが必要です!HIVE JSON用のテーブルを作成する - STRUCTエラー
JSONデータ:
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
}
}}
書を作成します。
CREATE TABLE complex_json(
widget struct<window:struct< title:string,name:string,width:int,height:int>,
debug:string,
image:struct< src:string,name:string,hOffset:int,vOffset:int,alignment:string > >
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';
そして、私はエラー取得しています:
にはParseExceptionラインを2時27分には、「ウィンドウ」「付近の入力を認識することはできません:列仕様の「ストラクト」」