Hive 配置单元分解结果在表中
有人能告诉我这个代码有什么问题吗?如果我只运行select语句,那么它将返回结果 如果我删除了“location”或“storageastextfile”行中的一行,代码就会正常工作。 另外,如果我也可以指定“分隔符”,请告诉我Hive 配置单元分解结果在表中,hive,hiveql,Hive,Hiveql,有人能告诉我这个代码有什么问题吗?如果我只运行select语句,那么它将返回结果 如果我删除了“location”或“storageastextfile”行中的一行,代码就会正常工作。 另外,如果我也可以指定“分隔符”,请告诉我 create table exploderesults location '/user/cloudera/sometest' stored as textfile as select id,ph as phone, ct as city from explodetes
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;
谢谢交换存储为和
位置
的两行。它们必须按照特定的顺序排列
如果要指定分隔符
create table exploderesults
row format delimited fields terminated by ','
stored as textfile
location '/user/cloudera/sometest'
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;
create table exploderesults
row format delimited fields terminated by ','
stored as textfile
location '/user/cloudera/sometest'
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;