Hiveshell命令-成都快上网建站

Hiveshell命令

连接 hive shell

创新互联自2013年创立以来,先为新城等服务建站,新城等地企业,进行企业商务咨询服务。为新城企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

直接输入 hive

 1、显示表

hive> show tables; 

OK 

test 

Time taken: 0.17 seconds, Fetched: 1 row(s)

 2、创建表

hive> create table test(key string); 

OK 

Time taken: 0.265 seconds

  3、创建分区表:

hive> create table logs(ts bigint,line string) partitioned by (dt String,country String);

  4、加载分区表数据:

hive> load data local inpath '/home/Hadoop/input/file1' into table logs partition (dt='2014-03-11',country='CN');

 5、展示表中有多少分区:

hive> show partitions logs; 

http://shenzhen.offcn.com/


文章标题:Hiveshell命令
标题链接:http://kswjz.com/article/gjcsih.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流