Sqoop import-all-tables --as-parquetfile gives erro

#1

[cloudera@quickstart ~]$ sqoop import-all-tables --connect “jdbc:mysql://quickstart.cloudera:3306/retail_db” --username retail_dba --password cloudera --as-parquetfile --warehouse-dir=/user/hive/warehouse --hive-import --hive-overwrite
This query gives this error
6/12/24 18:08:03 ERROR sqoop.Sqoop: Got exception running Sqoop: org.kitesdk.data.UnknownFormatException: Unknown format for serde:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
org.kitesdk.data.UnknownFormatException: Unknown format for serde:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
please someone help

0 Likes

#2

What is the sqoop version you are using? Parquet file added in 1.4.6 version.

0 Likes

#3

Thanks for help but version may be not the problem here
6/12/25 08:10:48 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.8.0
Sqoop 1.4.6-cdh5.8.0

0 Likes

#4

My understanding looking at your sqoop import command is that you are trying to import all tables (from MySQL DB to Hive as Parquet file) that were already imported previously as a different file format. Hence, I guess the Hive metastore contains one format but you try to overwrite the tables with a different format. I think this is the issue.

1 Like

Sqoop import-all-tables as parquet file giving permission issue
#5

I thing sqoop import does not support --hive-import with --as-parquetfile. you can import as-parquetfile using below command

sqoop import-all-tables --connect jdbc:mysql://127.0.0.1:3306/retail_db --username retail_dba --password cloudera --as-parquetfile --warehouse-dir /user/hive/warehouse

and create external table in hive using stored as parquet pointing to /user/hive/warehouse/table name.

0 Likes

#6

Thanks ,It worked I removed all already imported tables and it worked .

1 Like