Hé
You can use explode function that is an udf in hive: like this
SELECT explode(ActivityDates) AS ActivityDates FROM myMapTable;
and think who to map the result whith rates ;)
Regadrs.
Matouk
2014-02-01 Raj Hadoop :
> Hi,
>
>
> I have the following requirement from a Hive table below.
>
> Cus
Hi,
I have the following requirement from a Hive table below.
CustNumActivityDatesRates
10010-Aug-13,12-Aug-13,20-Aug-1310,15,20
The data above says that
From 10 Aug to 11 Aug the rate is 10.
From 12 Aug to 19 Aug the rate is 15.
From 20-Aug to till date the rate is 20.
Note : The order is m
Thanks everyone,
This worked for me: from_unixtime(unix_timestamp(dt,'MMdd' ),
'-MM-dd').
-Sonia
On Mon, Jun 25, 2012 at 11:18 PM, VanHuy Pham wrote:
> More specific, you need to use three functions in a row:
> 1) Use unix_timestamp(string date, string pattern) to convert the date
> va
More specific, you need to use three functions in a row:
1) Use unix_timestamp(string date, string pattern) to convert the date
variable, say dt, which you get from a hive query
2) Then use from_unixtime(bigint unixtime) to convert the bigint returned
in 1)
3) The use to_date(string timestamp) to c
https://cwiki.apache.org/Hive/languagemanual-udf.html#LanguageManualUDF-DateFunctions
--
Alexander Alten-Lorenz
http://mapredit.blogspot.com
German Hadoop LinkedIn Group: http://goo.gl/N8pCF
On Jun 26, 2012, at 2:05 AM, sonia gehlot wrote:
> Hi All,
>
> A simple question on dates, how can I con
I don't have the language manual in frot of me, but I would suggest casting
dateint to string, then using the unix_timestamp function. From_unixtime should
get it back into a date time string
Matt
On Jun 25, 2012, at 8:05 PM, sonia gehlot wrote:
> Hi All,
>
> A simple question on dates, ho