You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@crunch.apache.org by Bryan Baugher <bj...@gmail.com> on 2015/05/05 00:59:13 UTC

Convert PCollection> to PTable<..>

I was using the Shard.shard(..)[1] API to shard a PTable which gave me a
PCollection<Pair<..>>. I want to get the PTable back. Whats the best way to
do this? Should I write a DoFn myself or is there something already there?

Bryan

[1] -
http://crunch.apache.org/apidocs/0.11.0/org/apache/crunch/lib/Shard.html#shard(org.apache.crunch.PCollection,
int)

Re: Convert PCollection> to PTable<..>

Posted by Bryan Baugher <bj...@gmail.com>.
Ah, thank you!

On Mon, May 4, 2015 at 6:13 PM Josh Wills <jw...@cloudera.com> wrote:

> org.apache.crunch.lib.PTables.asPTable.
>
> On Tue, May 5, 2015 at 12:59 AM, Bryan Baugher <bj...@gmail.com> wrote:
>
>> I was using the Shard.shard(..)[1] API to shard a PTable which gave me a
>> PCollection<Pair<..>>. I want to get the PTable back. Whats the best way to
>> do this? Should I write a DoFn myself or is there something already there?
>>
>> Bryan
>>
>> [1] -
>> http://crunch.apache.org/apidocs/0.11.0/org/apache/crunch/lib/Shard.html#shard(org.apache.crunch.PCollection,
>> int)
>>
>
>
>
> --
> Director of Data Science
> Cloudera <http://www.cloudera.com>
> Twitter: @josh_wills <http://twitter.com/josh_wills>
>

Re: Convert PCollection> to PTable<..>

Posted by Josh Wills <jw...@cloudera.com>.
org.apache.crunch.lib.PTables.asPTable.

On Tue, May 5, 2015 at 12:59 AM, Bryan Baugher <bj...@gmail.com> wrote:

> I was using the Shard.shard(..)[1] API to shard a PTable which gave me a
> PCollection<Pair<..>>. I want to get the PTable back. Whats the best way to
> do this? Should I write a DoFn myself or is there something already there?
>
> Bryan
>
> [1] -
> http://crunch.apache.org/apidocs/0.11.0/org/apache/crunch/lib/Shard.html#shard(org.apache.crunch.PCollection,
> int)
>



-- 
Director of Data Science
Cloudera <http://www.cloudera.com>
Twitter: @josh_wills <http://twitter.com/josh_wills>