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

99封情书 提交于 2020-08-05 06:27:10

问题


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:


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.



来源:https://stackoverflow.com/questions/41307033/how-to-sqoop-to-import-oracle-clob-data-to-avro-files-on-hdfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!