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 Plain View
Sqoop >> mail # user >> Exporting hive table data into oracle give date format error


+
Ajit Kumar Shreevastava 2013-03-13, 13:43
+
Jarek Jarcec Cecho 2013-03-16, 22:58
+
Ajit Kumar Shreevastava 2013-03-19, 08:13
+
Jarek Jarcec Cecho 2013-03-19, 21:25
+
Ajit Kumar Shreevastava 2013-03-20, 07:30
+
Jarek Jarcec Cecho 2013-03-21, 00:48
Copy link to this message
-
RE: Exporting hive table data into oracle give date format error
Hi Jarek,

Thanks a lot. Its working fine.

In both the case in the chain mail.

I also want to know the reason for SQOOP behavior for the data its imported and exporting from oracle without the arguments --null-string '\\N', --null-non-string '\\N' on import job.

When I import the data without the arguments --null-string '\\N', --null-non-string '\\N' on import job to a Hive table. Then I am able to export successfully back to the Oracle table without any error and data mismatch. But copied the same table structure and data to another hive table I am not able to do so. Is there any reason for that? Is SQOOP store its data definition or data-formatting for the same?  If you explained the internal behavior of SQOOP to clear my concept for importing and exporting the table from a relation database to Hive and vice versa . I have explained the scenario in my chained mail for your reference and also highlighted the facts below.

I am looking for your valuable comments on the below highlighted scenario.

Thanking You,

Regards'

Ajit

-----Original Message-----
From: Jarek Jarcec Cecho [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2013 6:19 AM
To: [EMAIL PROTECTED]
Subject: Re: Exporting hive table data into oracle give date format error

Hi Ajit,

thank you for your nice summary. You seems to be missing Sqoop arguments --null-string '\\N', --null-non-string '\\N' on import job and --input-null-string '\\N', --input-null-non-string '\\N' on export. Would you mind adding them and rerunning your work flow?

Jarcec

On Wed, Mar 20, 2013 at 07:30:29AM +0000, Ajit Kumar Shreevastava wrote:

> Hi Jarcec,

>

>

>

> Thanking you for your valuable input and your suggestion seems to be

> valid. But I have some doubt about the SQOOP  behavior :-->

>

> 1.       If null create the confusion then some value similar to the below mentioned value are inserted to the oracle table with null treated as   string.

>

>      hive> select * from bttn_bkp_testing

>

>               > where bttn_id=39126;

>

>

>

> 39126.0 32436.0 3276.0  3.0     28.0    1.0     1.0     1.0     1.0     #FFFFFF #0000FF #0000FF #FFFFFF 0.0     0.0     NULL    NULL    1.0     1.0     1.0     NULL   null     20.0    2010-05-04 14:31:17.0   dbmigration     2013-01-18 09:11:18.37  DP_CQ4540       2010-11-29 15:45:03.976 ei009724        1.0     null    NULL    null   NULL     0.0     61253.0 61124.0 61124.0 61253.0

>

> 39126.0 50805.0 3276.0  3.0     28.0    1.0     1.0     1.0     1.0     #FFFFFF #0000FF #0000FF #FFFFFF 0.0     0.0     NULL    NULL    1.0     1.0     1.0     NULL   null     20.0    2010-05-23 23:18:54.604 ei103215        2013-01-18 09:11:18.37  DP_CQ4540       2010-11-29 15:45:03.976 ei009724        1.0     null    NULL    null   NULL     0.0     61253.0 61124.0 61124.0 61253.0

>

> 39126.0 63196.0 3276.0  3.0     28.0    1.0     1.0     1.0     1.0     #FFFFFF #0000FF #0000FF #FFFFFF 0.0     0.0     NULL    NULL    1.0     1.0     1.0     NULL   null     20.0    2010-11-04 18:25:23.956 ei103215        2013-01-18 09:11:18.37  DP_CQ4540       2010-11-29 15:45:03.976 ei009724        1.0     null    NULL    null   NULL     0.0     61253.0 61124.0 61124.0 61253.0

>

>

>

> These values are inserted into the oracle table BTTN_BKP_TEST as follows:--> .

>

> SQL> Select * from BTTN_BKP_TEST where bttn_id=39126;

>

>

>

> 39126    32436    3276       3              28           1              1              1              1              #FFFFFF               #0000FF               #0000FF                #FFFFFF               0              0                                              1              1              1                              null         20           05/04/2010 2:31:17.000000 PM          dbmigration       01/18/2013 9:11:18.370000 AM  DP_CQ4540        11/29/2010 3:45:03.976000 PM                ei009724              1              null                         null                         0              61253    61124    61124    61253
















































































































































































+
Jarek Jarcec Cecho 2013-03-21, 15:33
+
Ajit Kumar Shreevastava 2013-03-22, 07:37
+
Venkat 2013-03-21, 18:30
+
Jarek Jarcec Cecho 2013-03-22, 02:54
+
Venkat Ranganathan 2013-03-22, 03:24
+
Jarek Jarcec Cecho 2013-03-22, 03:46
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