Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

how to alter hive table partition

avatar
New Member

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

avatar
3 REPLIES 3

avatar

avatar

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

avatar
New Member

thanks for your reply. that help