Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-22 Thread Deepak Khandelwal
Hi All, I am new to Hive and I am trying to create a query for below aituation. Would appreciate if someone could guide on same. Thans a lot in advance. I have two TABLES shown below TABLE1 (USER_dETAILS) **USER_ID** | **USER_NAME** | **USER_ADDRESS** +--+--

RE: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-23 Thread Markovitz, Dudu
ame)) t; The result will look like: Id,key,value __ 1,fname,Dudu 1,lname,Markovitz 2,fname, Andrew 2,lname, Sears From: Deepak Khandelwal [mailto:dkhandelwal@gmail.com] Sent: Saturday, April 23, 2016 9:04 AM To: user@hive.apache.org Subject: Hive query to split one row into

Re: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-23 Thread Mich Talebzadeh
try this -- populate table user_parameters with user_id values (unique)from user_details INSERT user_parameters SELECT user_id, null, null FROM user_details -- Update remaining columnsd UPDATE user_parameters SET param_name = t1.user_name param_value = t1.user_address FROM

RE: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-23 Thread Markovitz, Dudu
Hi Mich, it seems the request was for unpivot. Dudu From: Mich Talebzadeh [mailto:mich.talebza...@gmail.com] Sent: Saturday, April 23, 2016 10:04 AM To: user Subject: Re: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name

Re: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-23 Thread Mich Talebzadeh
ect:* Re: Hive query to split one row into many rows such that Row 1 > will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 > value > > > > try this > > > > -- populate table user_parameters with user_id values (unique)from > user_details

Re: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-26 Thread Deepak Khandelwal
, Andrew > > 2,lname, Sears > > > > > > *From:* Deepak Khandelwal [mailto:dkhandelwal....@gmail.com > ] > *Sent:* Saturday, April 23, 2016 9:04 AM > *To:* user@hive.apache.org > > *Subject:* Hive query to split one row into many rows such that Row 1 > will have

RE: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-26 Thread Ryan Harris
all pairs. hope that helps From: Deepak Khandelwal [mailto:dkhandelwal@gmail.com] Sent: Tuesday, April 26, 2016 11:35 AM To: user@hive.apache.org Subject: Re: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and c

RE: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value

2016-04-26 Thread Markovitz, Dudu
ndrew 2,lname, Sears From: Deepak Khandelwal [mailto:dkhandelwal@gmail.com] Sent: Saturday, April 23, 2016 9:04 AM To: user@hive.apache.org Subject: Hive query to split one row into many rows such that Row 1 will have col 1 Name, col 1 Value and Row 2 will have col 2 Name and col 2 value Hi All, I am new