hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balaraman, Anand" <Anand_Balara...@SYNTELINC.COM>
Subject UNION ALL - what is the simplest form
Date Thu, 16 Aug 2012 06:06:49 GMT


I am trying to consolidate one of my staged tables with a primary table
(incremental loading).

Simply need to merge 2 tables using UNION ALL.

Tried the following:


        select * from main_table UNION ALL select * from stage_table

but, not able to execute it -> Error in semantic analysis: Top level
UNION is not supported currently; use a subquery for the UNION


But, HIVE language manual says:

UNION ALL is used to combine the result from multiple SELECT statements
into a single result set.



        select_statement UNION ALL select_statement UNION ALL
select_statement ...


Have I gone wrong with the syntax anywhere in my query ?




Anand B


Confidential: This electronic message and all contents contain information from Syntel, Inc.
which may be privileged, confidential or otherwise protected from disclosure. The information
is intended to be for the addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited. If you have received this
electronic message in error, please notify the sender immediately and destroy the original
message and all copies.

View raw message