Maheedhar Reddy 2013-07-08, 05:43
Matouk IFTISSEN 2013-07-08, 07:47
As I understand, you are having a column with data of type MM:SS in your input data set.
AFAIK this format is not in the standard java.sql.Timestamp format also it doesn't even have any date part . Hence you may not be able to use Timestamp data type here.
You can define it as a string and then develop your custom UDFs for any further processing.
Sent from remote device, Please excuse typos
From: Matouk IFTISSEN <[EMAIL PROTECTED]>
Date: Mon, 8 Jul 2013 09:47:11
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Need help in Hive
Try this function in hive query:
1- transform your data (type integer ) in timestamp (linux),
then do this:
2- from_unixtimeyour_date_timestamp), 'mm:ss') AS time
Hope this, you will give help.
2013/7/8 Maheedhar Reddy <[EMAIL PROTECTED]>
> Hi All,
> I have Hive 0.8.0 version installed in my single node Apache Hadoop
> I have a time column which is in format *MM:SS* (Minutes:seconds). I
> tried the date functions to get the value in MM:SS format. But its not
> working out.
> Below is my column for your reference.
> *Active Time*
> in the first record 12:01, 12 is the number of minutes and 01 is the
> so when the time i'm creating a table in Hive, i have to give a data type
> for this column Active Time,
> I have tried with various date type columns but none of them worked out
> for me. Please guide me.
> What function should I use, to get the time in *MM:SS* format?
> "You only live once, but if you do it right, once is enough."
> Maheedhar Reddy K V