Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> RE: UNION ALL - what is the simplest form


+
Balaraman, Anand 2012-08-16, 09:57
Copy link to this message
-
UNION ALL - what is the simplest form
Hi

 

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.

 

Syntax:

        select_statement UNION ALL select_statement UNION ALL
select_statement ...

 

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

 

Regards

 

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.
+
Bejoy KS 2012-08-16, 07:42
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB