hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Lipcon <t...@cloudera.com>
Subject Re: How to generate Row Id in Hive?
Date Thu, 25 Feb 2010 15:52:42 GMT
Zheng: is there a way to get at the hadoop conf variables from within a
query? If so, you could use mapred.task.id to get a unique string.

-Todd

On Thu, Feb 25, 2010 at 12:42 AM, Zheng Shao <zshao9@gmail.com> wrote:

> Since Hive runs many mappers/reducers in parallel, there is no way to
> generate a globally unique increasing row id.
> If you are OK with that, you can easily write a "non-deterministic"
> UDF. See rand() (or UDFRand.java) for example.
>
> Please open a JIRA if you plan to work on that.
>
> Zheng
>
> On Wed, Feb 24, 2010 at 6:47 PM, Weiwei Hsieh <whsieh@slingmedia.com>
> wrote:
> > All,
> >
> >
> >
> > Could anyone tell me on how to generate a row id for a new record in
> Hive?
> >
> >
> >
> > Many thanks.
> >
> >
> >
> > weiwei
>
>
>
> --
> Yours,
> Zheng
>

Mime
View raw message