Hive的数据模型.docVIP

  • 1
  • 0
  • 约1.79千字
  • 约 3页
  • 2019-12-09 发布于河北
  • 举报
Hive的数据模型

Hive 的数据模型 一,数据的存储 基于HDFS 没有专门的存储格式(默认情况下,hive中使用制表符,来分割列与列之间的间隔) 存储结构主要有:数据库,文件,表,视图 可以直接加载文本文件(.txt文件等) 创建表时可以指定,hive数据列分割符合行分割符; 二,数据表 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 ‘,’; 使用查询语句创建表(会转换为MapReduce创建表); Create table t4 as select * from students; Linux上查看hdfs上的文件(hdfs dfs -cat /user/hive/warehouse/t4/00_00) 使用查询语句创建表,并指定分割符 Create table t5 row format delimited fields

文档评论(0)

1亿VIP精品文档

相关文档