Hive_Hive的数据模型_内部表

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;

 

转载于:https://www.cnblogs.com/liupuLearning/p/6322471.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值