首页 > 其他 > 详细

hive的简单使用

时间:2018-05-17 20:23:53      阅读:149      评论:0      收藏:0      [点我收藏+]

显示数据库:

hive> show databases;

创建数据库:

hive> create database sunhive;

删除数据库:

hive> drop database if exists sunhive;

创建表:

hive> create table wyp (id int, name string, age int, tel string) row format delimited fields terminated by ‘\t‘  stored as textfile;

添加数据:

hive> load data local inpath ‘/Users/wochu/Desktop/tool/hdfs/fz.txt‘ into table wyp;

删除表内数据:

hive> truncate table wyp;

删除表:

hive> drop table if exists wyp;

 

hive的简单使用

原文:https://www.cnblogs.com/sunyaxue/p/9052800.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!