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 Threaded View
Hive >> mail # user >> Inserting data into Hive Tables from queries


Copy link to this message
-
Inserting data into Hive Tables from queries
Hi,

When using the INSERT OVERWRITE TABLE ... FROM SELECT syntax, you can
specify partition information for the inserts. However, these partition
values can only be literals. This seems too restrictive. For example, I have
a query like this:
SELECT month, day, count(1) FROM tab1 GROUP BY month, day;

When I insert into tab2 from the above select statement, I'd like the month
and day values to be used as partitions for the insert. Is there any way of
doing this? May be I'm trying to do this the wrong way?

Thanks,
Vijay
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