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

Switch to Plain View
Sqoop >> mail # user >> SQOOP 1.3.0 questions using SQL Server


+
Artem Ervits 2012-10-12, 17:29
+
Jarek Jarcec Cecho 2012-10-12, 17:50
+
Artem Ervits 2012-10-12, 18:01
+
Jarek Jarcec Cecho 2012-10-12, 18:08
+
Artem Ervits 2012-10-12, 18:16
+
Chalcy 2012-10-12, 20:18
+
Artem Ervits 2012-10-12, 21:16
+
Artem Ervits 2012-10-15, 19:25
+
Jarek Jarcec Cecho 2012-10-15, 20:33
Copy link to this message
-
RE: SQOOP 1.3.0 questions using SQL Server
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.
>
> 2) --compress
> Please try to reproduce this issue on 1.4.2 and file jira if you'll be able to reproduce it.
>
> 3) --as-avrodatafile
> Based on [2] SQL type -9 corresponds to data type NVARCHAR. We've added support for NVARCHAR in SQOOP-323 [3] that is part of Sqoop since version 1.4.0-incubating - e.g. 1.3.0 version do not support NVARCHAR type out of the box.
>
> Jarcec
>
> Links:
> 1: https://issues.apache.org/jira/browse/SQOOP-480

This electronic message is intended to be for the use only of the named recipient, and may contain information that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message.  Thank you.

This electronic message is intended to be for the use only of the named recipient, and may contain information that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message.  Thank you.
+
Jarek Jarcec Cecho 2012-10-26, 21:17
+
Artem Ervits 2012-10-26, 21:48
+
Jarek Jarcec Cecho 2012-10-26, 22:18