sqoop not import datatype varchar2 sqoop not import datatype varchar2 oracle oracle

sqoop not import datatype varchar2


you can try to downgrade the ojdbc instead of using higher ojdbc "ojdbc6 or ojdbc7" use "ojdbc14" this solved the problem for me but in order not to face an exception with some encoding classes not being found remove or rename the "ori18n.jar" while importing data from the orale9i.

you can find the paths to these jar files in "$HADOOP_CLASSPATH" and "$SQOOP_HOME"


May be sqoop couldn't identify the matching java type of VARCHAR2, so try with --map-column-java.

let's say column A is the VARCHAR2 type then your sqoop command would be,

sqoop import -D mapred.job.name='default oraoop' --driver oracle.jdbc.driver.OracleDriver --connect "jdbc:oracle:thin:MyIp:MyServiceName" --username "XXXX" --password "XX" --target-dir "My_dir" --query 'select * from MyTable where $CONDITIONS' --map-column-java a=String --split-by "coulmn" --boundary-query "SELECT min(splitColumn),max(SplitCoulmn) FROM DUAL" --num-mappers 30

let me know if this works.