Hadoop – excludes partition fields from the selection query in Hive

Suppose I have the following table definition in Hive (the actual table has about 65 columns):

CREATE EXTERNAL TABLE S .TEST (
COL1 STRING,
COL2 STRING
)
PARTITIONED BY (extract_date STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY'07'
LOCATION 'xxx';

Once the table is created, when I run hive -e “describe s.test”, I see that extract_date is a column in the table. Executing select * from s.test will also return extract_date column value. Is it possible to exclude this virtual (?) column when running a select query in Hive.

Change this attribute

set hive.support.quoted.identifiers=none;

and run the query

< /p>

SELECT `(extract_date)?+.+` FROM ;

I tested it to work properly.

Assumption I have the following table definition in Hive (the actual table has about 65 columns):

CREATE EXTERNAL TABLE S.TEST (
COL1 STRING,
COL2 STRING
)
PARTITIONED BY (extract_date STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY'07'
LOCATION'xxx';

Once The table is created, and when I run hive -e “describe s.test”, I see that extract_date is a column in the table. Execute select * from s.test The extract_date column value will also be returned. Can this virtual (?) be excluded when running a select query in Hive? ) Column.

Change this attribute

set hive.support.quoted.identifiers= none;

and run the query

SELECT `(extract_date)?+.+` FROM ;

I test It works fine.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4372 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.