Not sure if I fully understood your question, but will it be possible to send the PCollection that you read from XmlIO through a ParDo to generate the PCollection<KV<String,XmlDTO>> that you need ?
If this doesn't work, you can also try reading XML files directly from a ParDo and generating the PCollection that you need. Thanks, Cham On Mon, Dec 3, 2018 at 11:49 AM Vinay Patil <[email protected]> wrote: > Hi, > > I need a help regarding dynamic naming for Xml with KV PCollection. > > PCollection<KV<String,XmlDTO>> xmlCollection =…. > > I am not able to use XmlIO for this PCollection > XmlDTO is actually the dto marshalled and String is the key > > I tried using KV but XmlIO needs a Class type, KV.getClass does not work… > I need to get the Key for distribution and XmlDTO does not have it. > > Any suggestions? > > Regards, > Vinay Patil >
