Do you want the keys to be unique for a particular value of T or across the entire collection.
I don't think the latter is possible but someone else can correct me. For the first it is similar to a FlatMap so you can just do it within the process function of your DoFn. 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. >
