hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jov <zhao6...@gmail.com>
Subject Re: INSERT OVERWRITE LOCAL DIRECTORY -- Why it creates multiple files
Date Wed, 30 Mar 2011 05:22:32 GMT
try add limit:

INSERT OVERWRITE LOCAL DIRECTORY
'/home/hdp-user/hiveadmin_dirs/outbox/apachetest'
Select host, identity, user, time, request
from raw_apachelog
where ds = '2011-03-22-001500' limit 32;


2011/3/30 V.Senthil Kumar <vaisen2000@yahoo.com>:
> Hello,
>
> I have a hive query which does a simple select and writes the results to a local
>
> file system.
>
>
> For example, a query like this,
>
> INSERT OVERWRITE LOCAL DIRECTORY
> '/home/hdp-user/hiveadmin_dirs/outbox/apachetest'
> Select host, identity, user, time, request
> from raw_apachelog
> where ds = '2011-03-22-001500';
>
> Now this creates a two files under apachetest folder. This table has only 32
> rows. Is there any way I can make Hive to create only single file ?
>
>
> Appreciate your help :)
>
> Thanks,
> Senthil
>

Mime
View raw message