Posts: 35
Registered: ‎12-13-2013
Accepted Solution

Inserting to text table compressed

I see no way to specify a compression default in the create table statement, so I tried:


SET COMPRESSION_CODEC=gzip;insert overwrite <text_table> select .. from <another_table>


and got "Writing to compressed text table is not supported. Use query option ALLOW_UNSUPPORTED_FORMATS to override." but ALLOW_UNSUPPORTED_FORMATS shouldn't be used according to docs.


Is there a trick to having impala write text files compressed?




Cloudera Employee
Posts: 780
Registered: ‎03-23-2015

Re: Inserting to text table compressed

Impala won't be able to create gzip compression format for text file. Please refer to below documentation:

It mentioned below:

For text format, if LZO compression is used, you must create the table and load data in Hive.

If other kinds of compression are used, you must load data through LOAD DATA, Hive, or manually in HDFS.

So the short answer is that you can't do it in Impala.

Our community is getting a little larger. And a lot better.

Learn More about the Cloudera and Hortonworks community merger planned for late July and early August.