Something like this perhaps? (forgive my shorthand) with a as (select c1 from tb1), b as (select c2 from tb2), c as (select c3 from tb3)
select a.c1, b.c2, c.c3 from a JOIN b ON b.c2b = a.c1b JOIN c ON c.c3c = a.c1c; Paul From: Sowjanya Kakarala <sowja...@agrible.com> Sent: Tuesday, May 15, 2018 12:34 PM To: user@hive.apache.org Subject: Re: Combining hive tables as one query ok. but in my usecase join's/union's wont help. Here is an example of my usecase from postgres, which I have to do it in similar way for hive. with recursive a as (select col from tb1), b as (select col from tb2), c as (select col from tb3) select a,b,c from a,b,c; which output's me in a dataframe which i am writing to a csv and it looks like a b c 0.1 0.2 0.3 where hive is not supporting `with rec` in same functionality as in postgres and views are also not helping here. On Tue, May 15, 2018 at 11:19 AM, Alan Gates <alanfga...@gmail.com<mailto:alanfga...@gmail.com>> wrote: In general this is done using joins, as in all SQL engines. A google search on "intro to SQL joins" will suggest a number of resources, for example https://www.essentialsql.com/get-ready-to-learn-sql-12-introduction-to-database-joins/ Alan. On Tue, May 15, 2018 at 7:37 AM, Sowjanya Kakarala <sowja...@agrible.com<mailto:sowja...@agrible.com>> wrote: Hi all, Is there a way in hive that different tables data, can be read as in a single query? example: (something like) select a,b from (select col1 from tbl1)a , (select col1 from tb2)b); output as : a b 0.1 0.2 Any help is appreciated. Thanks Sowjanya -- Sowjanya Kakarala Infrastructure Software Engineer Agrible, Inc. | sowja...@agrible.com <mailto:sowja...@agrible.com> | 217-848-1128 2021 S. First Street, Suite 201, Champaign, IL 61820<https://maps.google.com/?q=2021+S.+First+Street,+Suite+201,+Champaign,+IL+61820&entry=gmail&source=g> Agrible.com<http://agrible.com/> | facebook<https://www.facebook.com/Agrible> | youtube<https://www.youtube.com/c/AgribleInc_TheInsightToDecide> | twitter<https://twitter.com/Agribleinc> [Image removed by sender. Agrible_Logo_Email_Signature.jpg]