Other sinks do have a way of writing something when there is no PCollection. One way to do this is to flatten the input PCollection with a PCollection containing .a single dummy element (generated using Create). That way there is always something there to trigger processing.
On Mon, Oct 16, 2017 at 7:24 AM, Chaim Turkel <[email protected]> wrote: > that is the problem, i want to write a status that i tried and that > there were no records > > On Mon, Oct 16, 2017 at 3:51 PM, Jean-Baptiste Onofré <[email protected]> > wrote: > > Hi Chaim, > > > > So, you mean you call MongoDBIO.write() with an empty PCollection (no > > element in the collection) ? > > > > The write is basically a DoFn so, it won't do anything if the > PCollection is > > empty. > > > > Regards > > JB > > > > > > On 10/16/2017 01:59 PM, Chaim Turkel wrote: > >> > >> Hi, > >> In the case that there are no records to read, is there a way to get > >> called so that i can write the status? > >> > >> chaim > >> > > > > -- > > Jean-Baptiste Onofré > > [email protected] > > http://blog.nanthrax.net > > Talend - http://www.talend.com >
