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
I just tried, but it still hangs there. I think all the executions run into
the same problem so I was wondering if I miss anything here.
1) Do I need to sart any other services to make hive thrift server work?
2) I can't seem to find the log information for hive-thrift server. There
is a folder cal
Can you do client.getAllTables()?
~Aniket
On Mon, Jun 25, 2012 at 12:43 PM, VanHuy Pham wrote:
> Hi,
>I am trying to use the hive thrift client to connect to hive. Even
> though I have started the hive thrift server (it's running by checking
> netstat -na | grep 1).
>However, the th
Hi,
I am trying to use the hive thrift client to connect to hive. Even
though I have started the hive thrift server (it's running by checking
netstat -na | grep 1).
However, the thrift client justs hangs forever when I execute a query.
here is the code:
TSocket tran
1) You have to SELECT every column you ORDER BY (id in this case)
2) the query is the same as in 1) - I assume you actually ran a different
query
igor
decide.com
On Mon, Jun 25, 2012 at 4:16 AM, Soham Sardar wrote:
> 1)hive> desc users_info;
> OK
> id int
> namestring
> age int
>
Dear Hive Users,
Please excuse this email if you are not in the UK.
I would like to announce the first Hive meetup in the UK in London. The
first meeting will be on the 10th of July.
Please find details about it at http://www.meetup.com/hivelondon/
This is free event and organised by me for Hiv
1)hive> desc users_info;
OK
id int
namestring
age int
country string
gender string
bdaystring
hive> desc users_audit;
OK
id int
userid int
logtime string
Time taken: 0.079 seconds
so both of my tables are fine and has data now the first query
Hi,
I have a column family named comments with data in following format :
KeyValue
comment_id502587858
CommentSome comments
crawled_page_id 23821746
date2012-04-19_14:14:55
So i found this discussion on this topic
http://mail-archives.apache.org/mod_mbox/hive-user/201006.mbox/%3caanlktikyl3hinowfo36yeyid9vojyh_6pe3slorhy...@mail.gmail.com%3E.
Makes more sense now. Will post my final resolution.
On Sun, Jun 24, 2012 at 10:39 PM, Sumit Kumar wrote:
> Hi,
>
> So i loo
Hi Shaik
You can do bucketing on any kind of hive table (partitions are not a
prerequisite for bucketing). You need to specify in your DDL how the
data should be distributed among how many buckets like.
CREATE TABLE user_info_bucketed(user_id BIGINT, firstname STRING, lastname
STRING)
CLUSTE
Hi,
If you want to make your temporary function permanent , you have to patch
hive source code. Please refer to this discussion
http://mail-archives.apache.org/mod_mbox/hive-user/201101.mbox/%3caanlktimbx1rskkwqi1pnnhrjkgc9cjurun_be8yoy...@mail.gmail.com%3E
On Mon, Jun 25, 2012 at 2:50 AM, Jasper
Hi Users,
I am new to hive ,i need the clarity on hive buckets as this is
done with the hive partition table only or we can create a buckets for hive
table .please give an example with the sample data.
Hi soham
Since the date is stored as String in hive you can use the date functions to
get the hour.
Just check whether the hour falls in between 10 and 11 AM
In simple terms,
WHERE hour('date')>= 10 AND hour('date') <= 11
If you want to consider the date as well then you need to play with th
i have a problem with querying with the datetime format of mysql and
then it has to stored in the string format and nothing else and then
when i try to query in it say name the users who logged between 10 to
11 am in time coz i am using LIKE which matches pattern and then i
cant give like for all
16 matches
Mail list logo