hive表之外部表

hive之外部表
1、指向已经在HDFS中存在的数据,在外部表中也可创建partition
2、外部表和内部表在元数据的组织上相同的,元数据可以保存在MYSQL数据库中
举例如下
$ hdfs dfs -put stduent01,stduent02,student03 /input
hive>create external table external_student(sid int,sname string,age int) delimited fields terminated by ',' location '/input';
hive>select * from external_student;

猜你喜欢

转载自blog.csdn.net/lepton126/article/details/80046064