Re: Creating Surrogate Keys in Hive

2017-11-21 Thread Alan Gates
It isn't possible to guarantee sequential keys because tasks run in parallel. You can write a UDF to assign a unique id or sequential ids within a task. Alan. On Tue, Nov 21, 2017 at 3:53 AM, kishore kumar wrote: > Hi, > > Could some one suggest how to create surrogate keys sequentially in hiv

Creating Surrogate Keys in Hive

2017-11-21 Thread kishore kumar
Hi, Could some one suggest how to create surrogate keys sequentially in hive ? -- Thanks, Kishore.

RE: foreign keys in Hive

2016-01-10 Thread Mich Talebzadeh
Sent: 10 January 2016 19:10 To: user@hive.apache.org; 'Ashok Kumar' Subject: RE: foreign keys in Hive Hi, Primary key and foreign key constraints are really more applicable to transactional databases where the transaction logic needs to be enforced. That is once a unit of work is complet

RE: foreign keys in Hive

2016-01-10 Thread Mich Talebzadeh
ated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither Peridale Ltd, its subsidiaries nor their employees accept any responsibility. From: Ashok Kumar [mailto:ashok34...@yahoo.com] Sent: 10 January 2016 14:45 To: User Subject: foreig

Re: foreign keys in Hive

2016-01-10 Thread Marcin Tustin
t; > what is the equivalent to foreign keys in Hive? > > Thanks > > -- Want to work at Handy? Check out our culture deck and open roles <http://www.handy.com/careers> Latest news <http://www.handy.com/press> at Handy Handy just raised $50m <http://venturebeat.com/2015/11

foreign keys in Hive

2016-01-10 Thread Ashok Kumar
hi, what is the equivalent to foreign keys in Hive? Thanks

Re: Keys in Hive

2015-06-23 Thread @Sanjiv Singh
Hi , DDL is not syntactically correct. You must be getting parsing error as keys are not supported on hive: Sample Error : NoViableAltException(26@[]) at org.apache.hadoop.hive.ql.parse.HiveParser.type(HiveParser.java:37295) at org.apache.hadoop.hive.ql.parse.HiveParser.colType(HivePars

Re: Keys in Hive

2015-06-02 Thread Prem Yadav
I believe there is support for primary key which is basically UNIQUE NOT NULL constraint. Ravi, what is the error you are getting? On Tue, Jun 2, 2015 at 2:20 PM, Edward Capriolo wrote: > Hive does not support primary key or other types of index constraints. > > On Tue, Jun 2, 2015 at 4:37 AM,

Re: Keys in Hive

2015-06-02 Thread Edward Capriolo
Hive does not support primary key or other types of index constraints. On Tue, Jun 2, 2015 at 4:37 AM, Ravisankar Mani < ravisankarm...@syncfusion.com> wrote: > Hi everyone, > > > > I am unable to create an table in hive with primary key > > Example : > > > > create table Hivetable((name string)

Re: Keys in Hive

2015-06-02 Thread 김영우
Hi Ravisankar, Hive tables do not have primary keys. See HIVE-6905 Thanks, Youngwoo On Tue, Jun 2, 2015 at 5:37 PM, Ravisankar Mani < ravisankarm...@syncfusion.com> wrote: > Hi everyone, > > > > I am unable to create an table in hive with primary key > > Example : > > > > create table Hivetab

Keys in Hive

2015-06-02 Thread Ravisankar Mani
Hi everyone, I am unable to create an table in hive with primary key Example : create table Hivetable((name string),primary key(name)); Could please help about the primary key query? Regards, Ravisankar M R

Re: Parse MAP viarable Keys in HIVE

2013-07-26 Thread Stephen Sprague
(arr) as arr ( select map_keys(myfield) from mytable > ) ; > > Both the above queries give syntax error. > > Is there a sample UDF program that could parse a MAP field in hive? > > -- > *From:* Stephen Sprague > *To:* user@hive.apache.org > *S

Re: Parse MAP viarable Keys in HIVE

2013-07-26 Thread R J
er@hive.apache.org Sent: Thursday, July 25, 2013 2:01 PM Subject: Re: Parse MAP viarable Keys in HIVE that sure looks like a nice candidate for a UDF, eh?  Come to think of it i'm surprised there isn't a jar file out there in openSource land that contains higher order functions

Re: Parse MAP viarable Keys in HIVE

2013-07-25 Thread Stephen Sprague
that sure looks like a nice candidate for a UDF, eh? Come to think of it i'm surprised there isn't a jar file out there in openSource land that contains higher order functions already. On Thu, Jul 25, 2013 at 11:20 AM, Arafat, Moiz wrote: > Try this: > > select > distinct arr --- Distinct V

Re: Parse MAP viarable Keys in HIVE

2013-07-25 Thread Arafat, Moiz
Try this: select distinct arr --- Distinct Values from ( select explode(arr) as arr -- Breaks Array in every column, as separate row . ( select map_keys(KV) as arr -- Returns an array of the Key Names for every row . from )a ) c order by arr; Thanks, Moiz On Jul 25, 2013, at 2:08

Parse MAP viarable Keys in HIVE

2013-07-25 Thread R J
Hi All, I have a table in Apache Hive and I am interested in a specific field of the table. Table name: Table1 and field name f1. The field f1 is of type MAP. The table is huge. How could I find the distinct key values of the MAP variable f1 above? I tried: $hive -e "select distinct map_keys(