Prashant, You might also want to explore Views in Hive.
--Bala G. On Tue, Jan 6, 2015 at 1:12 PM, Hulbert, Leland <[email protected]> wrote: > Prashant, > > What version of Hive are you running? Common Table > Expressions were added in 0.13. Take a look here: > https://cwiki.apache.org/confluence/display/Hive/Common+Table+Expression > > > > > > Lee > > > > *From:* Prashant [mailto:[email protected]] > *Sent:* Tuesday, January 06, 2015 3:54 PM > *To:* [email protected] > *Subject:* Temp table Vs Sub Query in Hive > > > > Hi All: > > > > In our process, we have created a temporary table which is built from > UNION ALL of 3 different queries. The temp table is used in further query > in join. > > > > We want to get rid of the temp table and have it integrated in final > query. Is there any better way to implement in Hive rather than placing > the query that created temp table as a subquery in the from clause? The > temp table would eventually get lots of rows so performance will be a key. > > > > > > Thanks! > > > > ~ Prashant > > > > > > ------------------------------ > > This e-mail and files transmitted with it are confidential, and are > intended solely for the use of the individual or entity to whom this e-mail > is addressed. If you are not the intended recipient, or the employee or > agent responsible to deliver it to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you are not one of the named > recipient(s) or otherwise have reason to believe that you received this > message in error, please immediately notify sender by e-mail, and destroy > the original message. Thank You. >
