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 >> hive multiple inserts


Copy link to this message
-
hive multiple inserts
In hive wiki <http://wiki.apache.org/hadoop/Hive/LanguageManual/DML>:

Hive extension (multiple inserts):
FROM from_statement
INSERT OVERWRITE [LOCAL] DIRECTORY directory1 select_statement1
[INSERT OVERWRITE [LOCAL] DIRECTORY directory2 select_statement2] ...
I'm try to use hive multi inserts to extract data from hive to local
disk. Follows is the hql

from test_tbl
INSERT OVERWRITE LOCAL DIRECTORY '/tmp/out/0' select select * where id%10=0
INSERT OVERWRITE LOCAL DIRECTORY '/tmp/out/1' select select * where id%10=1
INSERT OVERWRITE LOCAL DIRECTORY '/tmp/out/2' select select * where id%10=2
This hql can execute, but only /tmp/out/0 have datafile in it, other
directories are empty. why this happen? bug?
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