Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - hive multiple inserts


Copy link to this message
-
hive multiple inserts
wd 2010-01-05, 08:51
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?