Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Cannot export TIMESTAMP column to Oracle


Copy link to this message
-
Cannot export TIMESTAMP column to Oracle
Hello,

I'm trying to use Sqoop to export data to an Oracle table. The table has a
Timestamp column with Type TIMESTAMP(6) WITH TIME ZONE. The value is a long
representing milliseconds.

Here is a sample row:
*1400040430901* NULL NULL 7205849 591117613 SkipNotificationExp

The first column is the one with the problem.
Here is part of the log:
14/06/13 17:56:08 WARN tool.BaseSqoopTool: Setting your password on the
command-line is insecure. Consider using -P instead.
14/06/13 17:56:08 INFO manager.SqlManager: Using default fetchSize of 1000
14/06/13 17:56:08 INFO tool.CodeGenTool: Beginning code generation
14/06/13 17:56:09 INFO manager.OracleManager: Time zone has been set to GMT
14/06/13 17:56:09 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM etl.expt_email_rec t WHERE 1=0
14/06/13 17:56:09 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM etl.expt_email_rec t WHERE 1=0
14/06/13 17:56:09 ERROR orm.ClassWriter: Cannot resolve SQL type -101
14/06/13 17:56:09 ERROR orm.ClassWriter: Cannot resolve SQL type -101
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR orm.ClassWriter: No Java type for SQL type -101 for
column timestamp
14/06/13 17:56:09 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.NullPointerException
java.lang.NullPointerException
        at
org.apache.sqoop.orm.ClassWriter.parseNullVal(ClassWriter.java:912)
        at
org.apache.sqoop.orm.ClassWriter.parseColumn(ClassWriter.java:937)
        at
org.apache.sqoop.orm.ClassWriter.generateParser(ClassWriter.java:1020)
        at
org.apache.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java:1364)
        at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1176)
        at
org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
        at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:64)
        at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:100)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:238)

Any hint please?
I tried with Sqoop 1.4.3 and 1.4.4, with oracle driver 6.

Thanks
Leonardo

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB