首页 > 其他 > 详细

Hive_Hive的数据模型_内部表

时间:2017-01-20 14:23:51      阅读:263      评论:0      收藏:0      [点我收藏+]

Hive的数据模型_内部表

- 与数据库中的Table在概念上是类似。
- 每一个Table在Hive中都有一个相应的目录存储数据。
- 所有的Table数据(不包括External Table)都保存在这个目录中。

 

create table t1
(tid int, tname string, age int);

create table t2
(tid int, tname string, age int)
location /mytable/hive/t2

create table t3
(tid int, tname string, age int)
row format delimited fields terminated by ,;

create table t4
as
select * from t1;

 

hdfs dfs -cat /usr/hive/warehouse/tablename/000000_0

 

alter table t1 add columns(english int);
desc t1;

 

if open the recycle bin function of hdfs . we can see the file has not been deleted, but move from one dir to another dir, we can restore it.

drop table t1;

 

Hive_Hive的数据模型_内部表

原文:http://www.cnblogs.com/liupuLearning/p/6322471.html

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