You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by ma...@nokia.com on 2013/06/07 18:49:12 UTC

HQL *_utc_timestamp functions' timezone parameter?

The HQL *_utc_timestamp functions' timezone parameter appears to be documented only as far as noting its existence. What are its allowed values? Does it make any attempt to account for daylight savings time aka summer hours? (If so, should that attempt be trusted?)

Thanks in advance!

Mark Pundurs
Senior Data Analyst - Traffic
HERE
Chicago 

Re: HQL *_utc_timestamp functions' timezone parameter?

Posted by Matt Tucker <ma...@gmail.com>.
Hi Mark,

I ran into the same issue last week, and ended up writing a small app to
print the results of
getAvailableIDs()<http://docs.oracle.com/javase/6/docs/api/java/util/TimeZone.html#getAvailableIDs()>in
java.util.TimeZone.

Having to convert from GMT to Pacific Time (accounting for Daylight Saving
Time), I used "PST8PDT".  You may need to multiple your unix timestamp by
1000 for the *_utc_timestamp functions, as the Timestamp datatype appears
to be counting in milliseconds.

Good luck!


On Fri, Jun 7, 2013 at 9:49 AM, <ma...@nokia.com> wrote:

> The HQL *_utc_timestamp functions' timezone parameter appears to be
> documented only as far as noting its existence. What are its allowed
> values? Does it make any attempt to account for daylight savings time aka
> summer hours? (If so, should that attempt be trusted?)
>
> Thanks in advance!
>
> Mark Pundurs
> Senior Data Analyst - Traffic
> HERE
> Chicago
>

Running hadoop commands through Hive -e and -f option - this is not a question, just some answers :-)

Posted by Sanjay Subramanian <Sa...@wizecommerce.com>.
Hi

As a part of my oozie flows I need to create "touchz" files to notify
status of each stage.
I could never get Oozie shell action to work so I wanted to see if I could
use Hive to run a hdfs/hadoop command

I had run hadoop commands inside hive but wanted to run them using -e and
-f option

Here is the result of my experiment. Hopefully it helps some of u !

HIVE -e option
==============
hive -e \!"hdfs dfs -touchz
/user/sasubramanian/gz.files.2013-06-07.files.copied.successful"

HIVE -f option
==============
Contents of mytouch.hql
!hdfs dfs -touchz
/user/sasubramanian/gz.files.${DATE_STR}.files.copied.successful
# AT runtime I replace ${DATE_STR} with todays date
hive -f mytouch.hql
Creates the file beautifully

sanjay


CONFIDENTIALITY NOTICE
======================
This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.