我正在尝试使用sqoop-1从sybaseIQ导入数据。 jdts-1.3.1.jar
位于/sqoop/sqoop-1.4.6/lib
文件夹中。
运行此语法时,
sqoop import --connect '`jdbc:jtds:sybase:tds`://10.***.*.***@5500:*****' --driver 'com.sybase.jdbc3.jdbc.SybDriver' --username "username" --password -p --query "select * from dw.DM_ADDRESS where rownum <= 1000 and \$CONDITIONS" --target-dir "/user/*****/WT_Address_Itc" --split-by 1 --verbose
and am getting this error:
17/03/02 11:15:19 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : select * from dw.DM_ADDRESS_ITC where rownum <= 1000 and (1 = 0)
17/03/02 11:15:19 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.sybase.jdbc3.jdbc.SybDriver
java.lang.RuntimeException: Could not load db driver class: com.sybase.jdbc3.jdbc.SybDriver
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:856)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:744)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767)
at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270)
at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241)
at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery(SqlManager.java:234)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:304)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:606)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
我在这里缺少什么?我使用合适的司机吗?这是http://jtds.sourceforge.net/网站上提供的那个?
我真的很感谢你的帮助!
答案 0 :(得分:0)
驱动程序类n
属于MemberwiseClone
下载com.sybase.jdbc3.jdbc.SybDriver
并将其放在jconn3.jar
目录中。
connectionString必须是,
jconn3.jar