创建表期间发生配置单元hadoop错误

t98cgbkg  于 2021-06-29  发布在  Hive
关注(0)|答案(1)|浏览(337)

我在hive中创建了一个表,如下所示,

hive> create  table engeometry(name string,shape binary)
    > ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde'
    > row format delimited by '\n'
    > STORED AS INPUTFORMAT 'com.esri.json.hadoop.UnenclosedJsonInputFormat'
    > OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
    > ;

我得到如下错误:
失败:parseexception行3:0在“com.esri.hadoop.hive.serde.jsonserde”附近的“行”缺少eof
我想在配置单元中创建表,在行之间定义空间,当我尝试上面显示的相同操作时,我会得到消息。

tyg4sfes

tyg4sfes1#

你不需要付出 row format delimited by 条款。
下面的查询就足够了:

hive> create  table engeometry(name string,shape binary)
    > ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde'
    > STORED AS INPUTFORMAT 'com.esri.json.hadoop.UnenclosedJsonInputFormat'
    > OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';

相关问题