Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to alter hive table partition

avatar
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

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
Contributor

thanks for your reply. that help