hiveql - In Hive, Combining JOIN and IN CLAUSE in Single query -


can

in single query, want filter client partners - tabular & omni reports table , retrieve matching client partner message t1 & t2 tables

i cannot use in clause within hive throws error

select c.client_partner_name,c.client_partner_message_id reports c  c.client_partner_message_id in  (select a.client_partner_message_id t1  union   select b.client_partner_message_id t2 b)   , client_partner_name in ('tabular','omni') 

tabular format:

t1

client_partner_name    client_partner_messsage_id    vin partner1   msg1   vin1 partner3    msg2   vin2 

t2

client_partner_name    client_partner_message_id     vin partner1    msg9    vin6 partner2     msg10   vin7 

reports

client_partner_name vin    client_partner_message_id partner1   vin1   msg1 partner3   vin2   msg2 partner1   vin6   msg6 partner2   vin7   msg7 partner2   vin8   msg8 partner2   vin9   msg9 partner3   vin10  msg10 

expected output

client_partner_name  vin  client_partner_message_id partner1    vin1    msg1 partner2    vin9    msg9 

hive version- 0.13.1


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -