[英]Excluding the partition field from select queries in Hive
Suppose I have a table definition as follows in Hive(the actual table has around 65 columns): 假设我在Hive中有如下表定义(实际表有大约65列):
CREATE EXTERNAL TABLE S.TEST (
COL1 STRING,
COL2 STRING
)
PARTITIONED BY (extract_date STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\007'
LOCATION 'xxx';
Once the table is created, when I run hive -e "describe s.test"
, I see extract_date
as being one of the columns on the table. 一旦创建了表,当我运行
hive -e "describe s.test"
,我看到extract_date
是表中的一列。 Doing a select * from s.test
also returns extract_date
column values. select * from s.test
执行select * from s.test
也会返回extract_date
列值。 Is it possible to exclude this virtual (?) column when running select queries in Hive. 在Hive中运行选择查询时是否可以排除此虚拟 (?)列。
Change this property 更改此属性
set hive.support.quoted.identifiers=none;
and run the query as 并运行查询
SELECT `(extract_date)?+.+` FROM <table_name>;
I tested it working fine. 我测试它工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.