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.

Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

SOLVED Go to solution

Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

New Contributor

I have installed cloudera sqoop2 in my single node machine. It works fine while importing tables from RDBMS.  I want to zip my output file in HDFS. But I sqoop2 is not giving me the zip option while creating job in output configuration. After showing Database Configurations it is directly showing output directory options. Its missing out the zip option to choose from. Kindly help me ,. Thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

New Contributor

Thank yoiu  for the response Abe. I will try it in CDH5.

6 REPLIES 6

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Expert Contributor
I don't think the Zip is implemented in the MR framework. You'd have to implement Zip as a custom compression codec. Try extending DefaultCodec (https://hadoop.apache.org/docs/current/api/org/apache/hadoop/io/compress/DefaultCodec.html).

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

New Contributor

Thanks for the response Abe. But if you see this link sqoop2 import, while creating an import job, after "Database Configuration" in the "Output Configuration" sqoop2 displays an option to choose the compression format. But in my cloudera sqoop2 installation I am not able to view that option. After choosing the "output format", its directly showing the "Output Directory". Its not showing me the Compression Format option. Thanks in advance.

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Expert Contributor
What version of Sqoop2/CDH are you using?

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

New Contributor

Hi Abe. I am using Sqoop 1.99.2-cdh4.7.0. Am I missing something to install? Thanks in advance.

Highlighted

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Expert Contributor
https://issues.apache.org/jira/browse/SQOOP-1182

It looks like this was in for SQOOP-1.99.3. Also, CDH4.7.0 did not have any backports... so it is likely just not part of this release.

It did make it into CDH 5 release though. So upgrading should fix this problem.

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

New Contributor

Thank yoiu  for the response Abe. I will try it in CDH5.