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.

Hive error on Partitioned Parquet table

Highlighted

Re: Hive error on Partitioned Parquet table

New Contributor

Hi,

We've upgraded to CDH 5.6.0 and we still have the same issue. I've tried both

ALTER TABLE <table> SET FILEFORMAT PARQUET;

and

ALTER TABLE <table> PARTITION (<partition>) SET FILEFORMAT PARQUET;

but none of this worked. Any ideas how can I resolve it?

 

Regards,

Boyan

Re: Hive error on Partitioned Parquet table

Explorer

The below method worked for us.  This is from https://issues.cloudera.org/browse/IMPALA-2048 

 

If the table is MANAGED:

  • (Move table location) hadoop fs -mv /path/to/table /path/to/table.bak
  • (Get DDL) SHOW CREATE TABLE <table>;
  • DROP TABLE <table>;
  • CREATE TABLE <table> ...;
  • (Move partition data back) hadoop fs -mv /path/to/table.bak/* /path/to/table
  • (Recover partition metadata) MSCK REPAIR TABLE <table>;
Don't have an account?
Coming from Hortonworks? Activate your account here