Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to alter hive table partition

Solved Go to solution

how to alter hive table partition

New Contributor

I am using hdp 2.4.2 (hive - 1.2.1.2.4).

When I tried using the following hive command it gives me error. Is there a way to alter the table partition location?

show partitions btest.testcglbalances;
+-----------------------+--+
|       partition       |
+-----------------------+--+
| load_date=2017-02-16  |
+-----------------------+--+


alter table btest.testcglbalances partition (load_date='2017-02-16') set location 's3a://xxx/data/test/test2/2017-02-16';

Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter partition. alter is not possible (state=08S01,code=1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to alter hive table partition

3 REPLIES 3

Re: how to alter hive table partition

Re: how to alter hive table partition

Master Collaborator

If you ran this using beeline connecting to HS2, can you check the full error stack trace in the hiveserver2.log?

Re: how to alter hive table partition

New Contributor

thanks for your reply. that help