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

Switch to Threaded View
Sqoop, mail # user - SQOOP 1.3.0 questions using SQL Server


Copy link to this message
-
Re: SQOOP 1.3.0 questions using SQL Server
Jarek Jarcec Cecho 2012-10-26, 21:17
Hi Artem,
yes nvarchar (sql type -9) should be supported on 1.4.2. Would you mind share with us entire Sqoop command line and appropriate log generated with --verbose argument? Also what version of Java are using?

Jarcec

On Fri, Oct 26, 2012 at 09:09:56PM +0000, Artem Ervits wrote:
> I have Sqoop 1.4.2 installed
>
> Running sqoop version returns
>
> Sqoop 1.4.2
> git commit id
> Compiled by ag on Tue Aug 14 17:37:19 IST 2012
>
> When I tried to run a sqoop import-all-tables I got "Unknown SQL Data type: -9". From the discussion below, nvarchar should be supported in this version of sqoop, please advise?
>
> Thank you.
>
> -----Original Message-----
> From: Jarek Jarcec Cecho [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 15, 2012 4:34 PM
> To: [EMAIL PROTECTED]
> Cc: Marc Sturm
> Subject: Re: SQOOP 1.3.0 questions using SQL Server
>
> Hi Marc,
> please find my answers inline:
>
> On Mon, Oct 15, 2012 at 07:25:28PM +0000, Artem Ervits wrote:
> > I installed SQOOP 1.4.2 and was able to compress and then uncompress the data. I used the bin.tar.gz installer.
>
> Great!
>
> >
> > 1.       I did try to use the git repo to compile the sqoop jar and was able to compile it no problem which resulted in 1.4.3 snapshot jar using command ant jar-all. I noticed that  all other jars like avro are not present in the build or lib directory. How may I go about downloading source and compiling it to include avro, etc?
>
> If you need to build entire distribution (like the one that is offered in download page) including (almost) all dependency jars you need to run command "ant -Dhadoopversion=$hadoopVersion tar", where $hadoopVersion is your hadoop version. Supported values are 20, 23, 100 and 200.
>
> > 2.       I also tried to use the incremental switch, is this a correct command: "sqoop import -incremental 'lastmodified'" or does the command look some other way?
>
> Yes that is the intended usage. You might find more information about incremental imports in Sqoop documentation:
>
> http://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_incremental_imports
>
> > Thank you.
>
> Jarcec
>
> >
> >
> > From: Artem Ervits [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 12, 2012 5:17 PM
> > To: [EMAIL PROTECTED]
> > Cc: Marc Sturm
> > Subject: RE: SQOOP 1.3.0 questions using SQL Server
> >
> > Even better!
> >
> > Thank you.
> >
> > From: Chalcy
> > [mailto:[EMAIL PROTECTED]]<mailto:[mailto:[EMAIL PROTECTED]]>
> > Sent: Friday, October 12, 2012 4:18 PM
> > To: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
> > Subject: Re: SQOOP 1.3.0 questions using SQL Server
> >
> > Sqoop 1.4.3 freshly built even works very well with sql server. Just
> > get the sqoop jar and replace it and should work just fine.  I so far
> > never had any issues changing sqoop version :)
> >
> > Good luck!
> >
> > Thanks,
> > Chalcy
> > On Fri, Oct 12, 2012 at 2:16 PM, Artem Ervits <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
> > Actually I was just able to test 3) below and it succeeded, I cast the nvarchar as char.
> >
> > Thank you again, I will do 1) and 2) and report back the results.
> >
> > -----Original Message-----
> > From: Jarek Jarcec Cecho
> > [mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>]
> > Sent: Friday, October 12, 2012 1:51 PM
> > To: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
> > Subject: Re: SQOOP 1.3.0 questions using SQL Server Hi Artem, Sqoop
> > 1.3.0 is very old release, so I would definitely recommend to upgrade to latest 1.4.2. Please note that this release include SQOOP-480[1] that fixes some issues for connectors compiled against 1.3 in 1.4. Sqoop is simple command line utility so you might try to download release into some temporary folder and verify that everything is working prior upgrading Sqoop system wise.
> >
> > Specifically to your questions
> >
> > 1) --incremental
> > Usually Sqoop will print out error message first followed by help page, so I would advise checking few initial lines to see what exactly is wrong.