Re: current_date function in hive

2015-06-03 Thread Ayazur Rehman
Hi everyone, Thanks for the responses. My problem is solved now. I was not using the proper version of hive to be able to use the current_date function. Thanks Gopal for the UDF link. I beleive I will have to add the udf to the hiveserver2 in order to be able to run the query using Oozie. On Tue,

Re: current_date function in hive

2015-06-02 Thread Gopal Vijayaraghavan
Hi, > You may try to_date(FROM_UNIXTIME(UNIX_TIMESTAMP())) That would be a very bad idea for query correctness. The current_date UDF was introduced because of that particular anti-pattern. The unix_timestamp() is evaluated when a row is read, so each row gets a slightly different timestamp when

RE: current_date function in hive

2015-06-02 Thread Mich Talebzadeh
t any responsibility. From: Ayazur Rehman [mailto:rehman.ayazu...@gmail.com] Sent: 02 June 2015 15:19 To: user@hive.apache.org Subject: current_date function in hive Hi everyone, I am trying to schedule a hive query using Oozie, to perform aggregation on a table on data of a particular day

Re: current_date function in hive

2015-06-02 Thread Bhagwan S. Soni
Use "from_unixtime(unix_timestamp())". This might help you to get what you want. You may have to split date and time because this function will returns TIMESTAMP. On Tue, Jun 2, 2015 at 7:49 PM, Ayazur Rehman wrote: > Hi everyone, > > I am trying to schedule a hive query using Oozie, to perform

Re: current_date function in hive

2015-06-02 Thread DU DU
You may try to_date(FROM_UNIXTIME(UNIX_TIMESTAMP())) On Tue, Jun 2, 2015 at 10:19 AM, Ayazur Rehman wrote: > Hi everyone, > > I am trying to schedule a hive query using Oozie, to perform aggregation > on a table on data of a particular day and save the results in another > table whenever every 2

current_date function in hive

2015-06-02 Thread Ayazur Rehman
Hi everyone, I am trying to schedule a hive query using Oozie, to perform aggregation on a table on data of a particular day and save the results in another table whenever every 24 hours. the schema of my table is something like (tablename - currenttable) id string cdatetime