Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hive 配置单元分解结果在表中_Hive_Hiveql - Fatal编程技术网

Hive 配置单元分解结果在表中

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

有人能告诉我这个代码有什么问题吗?如果我只运行select语句,那么它将返回结果

如果我删除了“location”或“storageastextfile”行中的一行,代码就会正常工作。 另外,如果我也可以指定“分隔符”,请告诉我

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;