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 >> Sqoop export failed: Incorrect syntax near ','


Copy link to this message
-
Re: Sqoop export failed: Incorrect syntax near ','
Hi Ivangelion,
I'm glad that you were able to move on with your issue. It seems to me that you're running on OpenJDK - unfortunately Sqoop is tested and supported only Oracle JDK.

Based on the exceptions you're hitting:

  java.lang.NumberFormatException: For input string: "Male"

  java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff

It seems to me your input files got somehow corrupted and for example for the first exception Sqoop is looking for column that should be number but found string "Male" instead. You've mentioned that your data can contain a lot of wild characters, can it happen that your data also contains new line characters? Would you mind re-trying import with parameter --hive-drop-import-delims [1] to see if it helps? (this parameter do not depend on hive in any way regardless of it's name).

Jarcec

On Thu, Dec 06, 2012 at 12:03:06PM +0800, Ivangelion wrote:
> Hi Jarek,
>
> It actually worked! Thank you so much~! :D
>
> However now we faced another problem. The former data we tried to export is
> only test data, which row count is only 10. When we tried to export
> production data back into SQL Server from HDFS file which was previously
> imported using Sqoop from SQL server, different errors occurred. The row
> count is about 400k, and only about 120k rows were exported. This time we
> used "-m 5", and if using "-m 1", nothing will be exported. Verbose log is
> in the bottom of this mail.
>
> Is this has to do with that we used MS SQL connector to do previous import,
> not the default one?
>
> Also, should we specify any character encoding, e.g. utf-8 during
> import/export process? There are characters of many different languages in
> our original data in SQL Server, and I'm not sure what the encoding is
> after imported into HDFS.
>
> Thanks again, Jarek.
>
> ====================================> 12/12/05 19:55:27 DEBUG tool.BaseSqoopTool: Enabled debug logging.
> 12/12/05 19:55:27 DEBUG sqoop.ConnFactory: Loaded manager factory:
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 12/12/05 19:55:27 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 12/12/05 19:55:27 DEBUG manager.DefaultManagerFactory: Trying with scheme:
> jdbc:sqlserver:
> 12/12/05 19:55:27 INFO manager.SqlManager: Using default fetchSize of 1000
> 12/12/05 19:55:27 DEBUG sqoop.ConnFactory: Instantiated ConnManager
> com.cloudera.sqoop.manager.SQLServerManager@6766afb3
> 12/12/05 19:55:27 INFO tool.CodeGenTool: Beginning code generation
> 12/12/05 19:55:27 DEBUG manager.SqlManager: No connection paramenters
> specified. Using regular API for making connection.
> 12/12/05 19:55:27 DEBUG manager.SqlManager: Using fetchSize for next query:
> 1000
> 12/12/05 19:55:27 INFO manager.SqlManager: Executing SQL statement: SELECT
> t.* FROM member_main AS t WHERE 1=0
> 12/12/05 19:55:27 DEBUG orm.ClassWriter: selected columns:
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   MemberId
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   USERNAME
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   FirstName
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   LastName
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   EmailAddress
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Password
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Password_E5
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Birthday
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   CompanyName
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Gender
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Age
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Education
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Country
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Title
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Phone1
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Phone2
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Fax
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   State
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   City
> 12/12/05 19:55:27 DEBUG orm.ClassWriter:   Address1
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