There isn't currently a great of doing this, since in general, it would require single-threaded processing. Further, PCollections don't really have a concept of order.
Could you explain more about your use case? Why do you need to zip elements with their index? On Mon, Apr 10, 2017 at 1:28 PM Antony Mayi <[email protected]> wrote: > Hi, > > trying to implement a transformer PTransform<PCollection<T>, > PCollection<KV<Long, T>>> where the output keys would be generated element > indexes (increasing, unique). What's the best way to implement this before > the beam stateful DoFn is available? > > thx, > a. >
