Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> Sqoop export failed: Incorrect syntax near ','


+
Chun-fan Ivan Liao 2012-12-04, 09:51
+
Jarek Jarcec Cecho 2012-12-04, 16:01
+
Chun-fan Ivan Liao 2012-12-05, 04:25
+
Jarek Jarcec Cecho 2012-12-05, 16:23
+
Ivangelion 2012-12-06, 04:03
+
Jarek Jarcec Cecho 2012-12-06, 16:28
+
Chun-fan Ivan Liao 2012-12-07, 03:19
Copy link to this message
-
Re: Sqoop export failed: Incorrect syntax near ','
I see, Would you mind upgrading your Sqoop to most recent version 1.4.2?

Jarcec

On Fri, Dec 07, 2012 at 11:19:31AM +0800, Chun-fan Ivan Liao wrote:
> Hi Jarek,
>
> I've tried to use "--hive-drop-import-delims", but sqoop showed it has
> syntax error:
>
>   ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-drop-import-delims
>
> Also, should I change Java OpenJDK to Oracle JDK in order to make Sqoop
> export work?
>
> Thanks!
> Ivan
>
> On Fri, Dec 7, 2012 at 12:28 AM, Jarek Jarcec Cecho <[EMAIL PROTECTED]>wrote:
>
> > 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
>
+
Chun-fan Ivan Liao 2012-12-07, 07:45
+
Jarek Jarcec Cecho 2012-12-07, 16:02
+
Chun-fan Ivan Liao 2012-12-10, 07:08