You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by "Chagarlamudi, Prasanth" <pr...@epsilon.com> on 2014/11/03 22:57:20 UTC

Sqoop2 null conversions

Hello all,



I am using sqoop2 to import data from Oracle DB to HDFS(as TEXT_FORMAT). I = =3D noticed that sqoop is inserting null string('null') for empty value in = Orac=3D le.



I am expecting a non-string NULL value here. Is there any alternative where= =3D  I can convert empty values from ORACLE DB to non-string null values?



Any help would be appretiated.





Thanks in advance



Prasanth Chagarlamudi


________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

unsubscribe

Posted by "xuzl@infobird.com" <xu...@infobird.com>.



xuzl@infobird.com
 
From: Chagarlamudi, Prasanth
Date: 2014-11-04 05:57
To: user@sqoop.apache.org
Subject: Sqoop2 null conversions
Hello all,
 
I am using sqoop2 to import data from Oracle DB to HDFS(as TEXT_FORMAT). I = =3D noticed that sqoop is inserting null string('null') for empty value in = Orac=3D le.
 
I am expecting a non-string NULL value here. Is there any alternative where= =3D  I can convert empty values from ORACLE DB to non-string null values?
 
Any help would be appretiated.
 
 
Thanks in advance
 
Prasanth Chagarlamudi
 




This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

RE: Sqoop2 null conversions

Posted by "Chagarlamudi, Prasanth" <pr...@epsilon.com>.
Thank you Abe for taking time to look into this..

My ORACLE table with four columns FIRST_NAME, LAST_NAME, SALARY, JOIN_DATE. This is the source table info I feed to the sqoop for importing.

[cid:image001.png@01CFF847.BC1CE350]

After the import when I do a –cat command on the location where sqoop dumped the file…here is what I see

'prasanth','chagarlamudi',1,2014-10-30 15:48:11.0
'Srivenu','null',2,2014-10-30 00:00:00.0
'Viay','Ganta',4,'null'

It is replacing the nulls from the ORACLE to a string null(‘null’). I am expecting a non-string NULL or blank/empty string.

Please let me know if you have any questions.

Appreciate your help
Prasanth Chagarlamudi

From: Abraham Elmahrek [mailto:abe@cloudera.com]
Sent: Tuesday, November 04, 2014 1:56 PM
To: user@sqoop.apache.org
Subject: Re: Sqoop2 null conversions

Hey there,

Could you provide an example of your output? It looks like Sqoop is in fact passing the string "null" no matter what right now. Things have changed a bit since 1.99.3, but I've created https://issues.apache.org/jira/browse/SQOOP-1661 to track this.

-Abe

On Mon, Nov 3, 2014 at 1:57 PM, Chagarlamudi, Prasanth <pr...@epsilon.com>> wrote:

Hello all,



I am using sqoop2 to import data from Oracle DB to HDFS(as TEXT_FORMAT). I = =3D noticed that sqoop is inserting null string('null') for empty value in = Orac=3D le.



I am expecting a non-string NULL value here. Is there any alternative where= =3D  I can convert empty values from ORACLE DB to non-string null values?



Any help would be appretiated.





Thanks in advance



Prasanth Chagarlamudi


________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.


________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

Re: Sqoop2 null conversions

Posted by Abraham Elmahrek <ab...@cloudera.com>.
Hey there,

Could you provide an example of your output? It looks like Sqoop is in fact
passing the string "null" no matter what right now. Things have changed a
bit since 1.99.3, but I've created
https://issues.apache.org/jira/browse/SQOOP-1661 to track this.

-Abe

On Mon, Nov 3, 2014 at 1:57 PM, Chagarlamudi, Prasanth <
prasanth.chagarlamudi@epsilon.com> wrote:

>  Hello all,
>
>
>
> I am using sqoop2 to import data from Oracle DB to HDFS(as TEXT_FORMAT). I
> = =3D noticed that sqoop is inserting null string('null') for empty value
> in = Orac=3D le.
>
>
>
> I am expecting a non-string NULL value here. Is there any alternative
> where= =3D  I can convert empty values from ORACLE DB to non-string null
> values?
>
>
>
> Any help would be appretiated.
>
>
>
>
>
> Thanks in advance
>
>
>
> Prasanth Chagarlamudi
>
>
>
> ------------------------------
>
> This e-mail and files transmitted with it are confidential, and are
> intended solely for the use of the individual or entity to whom this e-mail
> is addressed. If you are not the intended recipient, or the employee or
> agent responsible to deliver it to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you are not one of the named
> recipient(s) or otherwise have reason to believe that you received this
> message in error, please immediately notify sender by e-mail, and destroy
> the original message. Thank You.
>