Support Questions
Find answers, ask questions, and share your expertise

How to create a partitioned parquet table LIKE another partitioned table table?

Explorer

I have a partitioned table A in sequence file. Now to want to create a partitioned parquet table B with schema and data same as A.

What I have tried:

create table A like B;
alter table A set fileformat parquet;
insert into table A partition(part) select*from B;

This gives error (surprisingly works for fileformat orc)

SemanticException Line 1:18 Exception while processing 'A': must specify an InputFormat class

Now something like this also does not work.

create table A stored as parquet partitioned by (part) like B;

All my three requirements (parquet, partition, like B) just does not come in same line according to hive.

How to create such a table?

0 REPLIES 0