谁能告诉我这段代码有什么问题? 如果我只运行select语句,那么它就会返回结果。
如果我删除其中一行 "location "或 "storeed as textfile",代码就能正常运行。另外,请告诉我是否可以指定 "分隔符"。
create table exploderesults
location '/user/cloudera/sometest'
stored as textfile
as
select id,ph as phone, ct as city from explodetest
lateral view explode(phone)p as ph
lateral view explode(city)c as ct;
谢谢
1条答案
按热度按时间lokaqttq1#
将 "stored as "和 "location "这两行调换一下,根据手册的规定,它们必须按照特定的顺序进行。
如果你想指定一个定界符。