sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prabhakar <o.prabha...@gmail.com>
Subject Re: wrong string created after sqoop import for timestamp
Date Wed, 16 Apr 2014 13:32:03 GMT
thanks you very much sandipan, its working

i used  DATE_FORMAT( FROM_UNIXTIME( unix_timestamp(sav.updatedAt)
),'%Y-%m-%d %H:%i:%s' ) for getting the correct value to HDFS.
is it there any better function, so that we can improve the performance.
thanks any why its working for me

Thanks,
Prabhakar


On Wed, Apr 16, 2014 at 5:14 PM, Sandipan.Ghosh
<Sandipan.Ghosh@target.com>wrote:

>  This is because HDFS convert it to timestamp Hadoop, which have milisec
> also. If you don’t want this cast the date column as string in mysql and
> import as string in hdfs.
>
>
>
> Hope this help.
>
> Thanks
>
> sandipan
>
>
>
> *From:* Prabhakar [mailto:o.prabhakar@gmail.com]
> *Sent:* Wednesday, April 16, 2014 5:09 PM
> *To:* user@sqoop.apache.org
>
> *Subject:* wrong string created after sqoop import for timestamp
>
>
>
> Hi,
>
>
>
>  I am trying to import mysql table to HDFS,
>
> here one of the column in mysql is timestamp
>
> after importing this table i am seeing the extra value for column.
>
>
>
> in Mysql time is : 1903-05-28 16:13:52
>
>
>
> after import in HDFS it is:  1903-05-28 16:13:52.0
>
>
>
> at end ".0" adding extra.
>
> pls help me on this
>
>
>
> Thanks,
>
> Prabhakar
>

Mime
View raw message