Member since
08-22-2016
9
Posts
2
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
8311 | 03-01-2017 04:41 PM |
03-15-2017
07:38 PM
1 Kudo
i have 100 tables Test_1,Test_2......Test80 test90 out of which some 70 tables start with string Test_ need to be removed. I need to use only hive queries, nothing from unix just pure hive commands, I am looking for something like this drop table where tablename like Test_*
... View more
Labels:
- Labels:
-
Apache Hive
03-01-2017
04:41 PM
you can use left join to get this Step5 can be replace with create table z_test2 as select a.LastName, case when b.FirstName is null then a.FirstName else b.FirstName end as firstname, a.address, a.city from z_test1 a left outer join z_test b on a.LastName = b.LastName
... View more
02-03-2017
07:39 PM
H @Eugene Koifmani, I tried understanding the documentation you have provided but couldn't figure it out what you are saying, I want an hive working code which can replace this update z_test1 set FirstName= z.FirstName from z_test z where z_test1.LastName= z.LastName
... View more
02-03-2017
05:23 PM
I need to do an update of a column with values from another table Step1: execute(set hive.enforce.bucketing=true)by hadoop; execute(set hive.exec.dynamic.partition.mode=nonstrict)by hadoop; CREATE TABLE z_test1
(
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)
clustered by (City) into 3 buckets
stored as orc TBLPROPERTIES ('transactional'='true') Step2: Insert into z_test1 VALUES ("david","baker","houston","tx"),("rose","crab","houston","tx") lastname firstname address city
david baker houston tx
rose crab houston tx Step3: execute(set hive.enforce.bucketing=true)by hadoop; execute(set hive.exec.dynamic.partition.mode=nonstrict)by hadoop; CREATE TABLE z_test
(
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255),
country varchar(255)
)
clustered by (City) into 3 buckets
stored as orc TBLPROPERTIES ('transactional'='true') Step4: Insert into z_test VALUES ("david","burrows","houston","tx","usa") lastname firstname address city country
david burrows houston tx usa
Step5: update z_test1 set FirstName= z.FirstName from z_test z where z_test1.LastName= z.LastName Error in step5 Desired Result: davids first name in table z_test1 should be updated as burrows from second table lastname firstname address city
david burrows houston tx
rose crab houston tx
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache Hive