You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@apex.apache.org by Hitesh Goyal <hi...@nlpcaptcha.com> on 2016/08/22 06:51:46 UTC

Retrieving a particular key from couchbase.

Hi team,
  I am using CouchbasePojoInputOperator. I want to process on a particular key-value. How can I retrieve a particular key from the document. And also tell me what does emitTuple function returns.

Regards,
Hitesh Goyal
Simpli5d Technologies
Cont No.: 9599803307


Re: Retrieving a particular key from couchbase.

Posted by Shubham Pathak <sh...@datatorrent.com>.
Hi Hitesh,

CouchbasePojoInputOperator emits a POJO for each row. You can add another
operator after this to process the records. In the process method of the
next operator, you may access data for a particular key using corresponding
getter methods.

You can check how a key is accessed in this test
https://github.com/apache/apex-malhar/blob/master/contrib/src/test/java/com/datatorrent/contrib/couchbase/CouchBasePOJOTest.java

Input operators implement emitTuple() method to generate payload for other
operators. Tuples emitted are marked as belonging to the windowId
identified by immediately preceding beginWindow call.

Thanks,
Shubham

On Mon, Aug 22, 2016 at 12:21 PM, Hitesh Goyal <hi...@nlpcaptcha.com>
wrote:

> Hi team,
>
>   I am using CouchbasePojoInputOperator. I want to process on a particular
> key-value. How can I retrieve a particular key from the document. And also
> tell me what does emitTuple function returns.
>
>
>
> Regards,
>
> *Hitesh Goyal*
>
> Simpli5d Technologies
>
> Cont No.: 9599803307
>
>
>