You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Brian Jeltema <br...@digitalenvoy.net> on 2015/06/25 17:34:49 UTC
EXPORTing multiple partitions
Using Hive .13, I would like to export multiple partitions of a table, something conceptually like:
EXPORT TABLE foo PARTITION (id=1,2,3) to ‘path’
Is there any way to accomplish this?
Brian
Re: EXPORTing multiple partitions
Posted by Devopam Mittra <de...@gmail.com>.
+1
regards
Dev
On Fri, Jun 26, 2015 at 12:50 PM, @Sanjiv Singh <sa...@gmail.com>
wrote:
> What about this :
>
> create view foo_copy_partition AS select * from foo where id in (1,2,3);
> export table foo_copy_partition to ‘path’;
> drop view foo_copy_partition ;
>
>
>
>
> Regards
> Sanjiv Singh
> Mob : +091 9990-447-339
>
> On Fri, Jun 26, 2015 at 7:40 AM, Xuefu Zhang <xz...@cloudera.com> wrote:
>
>> Hi Brian,
>>
>> If you think that is useful, please feel free to create a JIRA requesting
>> for it.
>>
>> Thanks,
>> Xuefu
>>
>> On Thu, Jun 25, 2015 at 10:36 AM, Brian Jeltema <
>> brian.jeltema@digitalenvoy.net> wrote:
>>
>>> Answering my own question:
>>>
>>> create table foo_copy like foo;
>>> insert into foo_copy partition (id) select * from foo where id in
>>> (1,2,3);
>>> export table foo_copy to ‘path’;
>>> drop table foo_copy;
>>>
>>> It would be nice if export could do this automatically, though.
>>>
>>> Brian
>>>
>>> On Jun 25, 2015, at 11:34 AM, Brian Jeltema <
>>> brian.jeltema@digitalenvoy.net> wrote:
>>>
>>> > Using Hive .13, I would like to export multiple partitions of a table,
>>> something conceptually like:
>>> >
>>> > EXPORT TABLE foo PARTITION (id=1,2,3) to ‘path’
>>> >
>>> > Is there any way to accomplish this?
>>> >
>>> > Brian
>>>
>>>
>>
>
--
Devopam Mittra
Life and Relations are not binary
Re: EXPORTing multiple partitions
Posted by "@Sanjiv Singh" <sa...@gmail.com>.
What about this :
create view foo_copy_partition AS select * from foo where id in (1,2,3);
export table foo_copy_partition to ‘path’;
drop view foo_copy_partition ;
Regards
Sanjiv Singh
Mob : +091 9990-447-339
On Fri, Jun 26, 2015 at 7:40 AM, Xuefu Zhang <xz...@cloudera.com> wrote:
> Hi Brian,
>
> If you think that is useful, please feel free to create a JIRA requesting
> for it.
>
> Thanks,
> Xuefu
>
> On Thu, Jun 25, 2015 at 10:36 AM, Brian Jeltema <
> brian.jeltema@digitalenvoy.net> wrote:
>
>> Answering my own question:
>>
>> create table foo_copy like foo;
>> insert into foo_copy partition (id) select * from foo where id in
>> (1,2,3);
>> export table foo_copy to ‘path’;
>> drop table foo_copy;
>>
>> It would be nice if export could do this automatically, though.
>>
>> Brian
>>
>> On Jun 25, 2015, at 11:34 AM, Brian Jeltema <
>> brian.jeltema@digitalenvoy.net> wrote:
>>
>> > Using Hive .13, I would like to export multiple partitions of a table,
>> something conceptually like:
>> >
>> > EXPORT TABLE foo PARTITION (id=1,2,3) to ‘path’
>> >
>> > Is there any way to accomplish this?
>> >
>> > Brian
>>
>>
>
Re: EXPORTing multiple partitions
Posted by Xuefu Zhang <xz...@cloudera.com>.
Hi Brian,
If you think that is useful, please feel free to create a JIRA requesting
for it.
Thanks,
Xuefu
On Thu, Jun 25, 2015 at 10:36 AM, Brian Jeltema <
brian.jeltema@digitalenvoy.net> wrote:
> Answering my own question:
>
> create table foo_copy like foo;
> insert into foo_copy partition (id) select * from foo where id in
> (1,2,3);
> export table foo_copy to ‘path’;
> drop table foo_copy;
>
> It would be nice if export could do this automatically, though.
>
> Brian
>
> On Jun 25, 2015, at 11:34 AM, Brian Jeltema <
> brian.jeltema@digitalenvoy.net> wrote:
>
> > Using Hive .13, I would like to export multiple partitions of a table,
> something conceptually like:
> >
> > EXPORT TABLE foo PARTITION (id=1,2,3) to ‘path’
> >
> > Is there any way to accomplish this?
> >
> > Brian
>
>
Re: EXPORTing multiple partitions
Posted by Brian Jeltema <br...@digitalenvoy.net>.
Answering my own question:
create table foo_copy like foo;
insert into foo_copy partition (id) select * from foo where id in (1,2,3);
export table foo_copy to ‘path’;
drop table foo_copy;
It would be nice if export could do this automatically, though.
Brian
On Jun 25, 2015, at 11:34 AM, Brian Jeltema <br...@digitalenvoy.net> wrote:
> Using Hive .13, I would like to export multiple partitions of a table, something conceptually like:
>
> EXPORT TABLE foo PARTITION (id=1,2,3) to ‘path’
>
> Is there any way to accomplish this?
>
> Brian