How to sqoop to import oracle clob data to avro files on hdfs

2.6k views Asked by At

I am getting a strange error when sqooping the data from oracle DB to HDFS. Sqoop is not able to import clob data into an avro files on hadoop.

This is the sqoop import error :

ERROR tool.ImportTool: Imported Failed: Cannot convert SQL type 2005

Do we need to add any extra arguments to sqoop import statement for it correctly import clob data into avro files ?

1

There are 1 answers

0
Vamshi Krishna On BEST ANSWER

Update: Found the solution, We need to add --map-column-java for the clob columns.

For Eg: If the column name is clob then we have pass --map-column-java clob=string for sqoop to import the clob columns.