hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Shao <zsh...@gmail.com>
Subject Re: DATETIME or TIMESTAMP data type?
Date Mon, 13 Jul 2009 08:48:56 GMT
Hi Saurabh,

Hive does not have a native date/time data type. In all the cases that
we have seen, storing timestamp as BIGINT or STRING is good enough for
our users' applications.

There is a set of UDFs for date/time stored as bigint/string:
http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#head-8c92c62e9912ded44cc753d56fdf973ca1377f37
It's also very easy to write your own UDFs.

Zheng

On Mon, Jul 13, 2009 at 1:32 AM, Saurabh Nanda<saurabhnanda@gmail.com> wrote:
> Hi,
>
> I'm a complete Hive newbie, so please excuse me if this question sounds too
> dumb. I didn't see a native date/time data type at
> http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL. Is this an omission
> in the documentation or does Hive really not have a native date/time data
> type?
>
> Should I convert the timestamp in my log files to a Unix timestamp (BIGINT)
> and store it? Or should I treat the timestamp as a STRING?
>
> Thanks,
> Saurabh.
> --
> http://nandz.blogspot.com
> http://foodieforlife.blogspot.com
>



-- 
Yours,
Zheng

Mime
View raw message