ORA-01843 error when importing table in Sqoop

Asked

Viewed 78 times

0

I’m facing a mistake that I can’t understand the origin of.

Previously I had imported a table with the same data format, with 54 million lines to my HDFS cluster hadoop.

Now I’ve created a _View_ in my database Oracle and selected a portion of the table data. Now it has only 260k lines, however now I face this cited error even using a similar command.

SQOOP

The error generated this here:

Error: java.io.Ioexception: Sqlexception in nextKeyValue at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(Dbrecordreader.java:277) at org.apache.Hadoop.mapred.Maptask$Newtrackingrecordreader.nextKeyValue(Maptask.java:556) at org.apache.Hadoop.mapreduce.task.MapContextImpl.nextKeyValue(Mapcontextimpl.java:80) at org.apache.Hadoop.mapreduce.lib.map.Wrappedmapper$Context.nextKeyValue(Wrappedmapper.java:91) at org.apache.Hadoop.mapreduce.Mapper.run(Mapper.java:145) at org.apache.sqoop.mapreduce.Autoprogressmapper.run(Autoprogressmapper.java:64) at org.apache.Hadoop.mapred.Maptask.runNewMapper(Maptask.java:787)
at org.apache.Hadoop.mapred.Maptask.run(Maptask.java:341) at org.apache.Hadoop.mapred.Yarnchild$2.run(Yarnchild.java:168) at java.security.Accesscontroller.doPrivileged(Native Method) at javax.security.auth.Subject.doas(Subject.java:422) at org.apache.Hadoop.security.Usergroupinformation.doas(Usergroupinformation.java:1709) at org.apache.Hadoop.mapred.Yarnchild.main(Yarnchild.java:162)
Caused by: java.sql.Sqldataexception: ORA-01843: not a Valid Month

Previously I was able to export, also with the data coming from a View, only with the full table.

The command used was:
sqoop import --connect jdbc:oracle:thin:<meu_host:porta:instancia> --username <user> --password <pass> --table <DB.TABLE> --split-by NUM_LINHA --m 10 --target-dir /user/rodrigo/RESUMO_TABELONA 2>&1|tee import_tab_menor.txt

1 answer

1


The error occurred by the way I created the View, using a literal to select a date range:

DT_F>'02/04/16

The error ceased to occur when I used:

to_date('02/04/16' , 'dd/mm/yy)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.