【发布时间】:2016-08-26 06:31:59
【问题描述】:
我想知道是否可以从存储在 hadoop 文件系统 (users.tbl) 中的 ORC 格式的文件中创建一个配置单元表。我读到 ORC 格式在优化方面比文本更好。所以我想知道是否可以使用stored as orc tblproperties 和location 属性创建一个hive 表,从hdfs 文件中创建一个orc 格式的表。
某事:
create table if not exists users
(USERID BIGINT,
NAME STRING,
EMAIL STRING,
CITY STRING)
STORED AS ORC TBLPROPERTIES ("orc.compress"="SNAPPY")
LOCATION '/tables/users/users.tbl';
插入文本:
create table if not exists users
(USERID BIGINT,
NAME STRING,
EMAIL STRING,
CITY STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE
LOCATION '/tables/users/users.tbl';
【问题讨论】: