You'll have to write your own source to do this. You can copy large parts of TextIO/CompressedSource to get what you want.
On Mon, Aug 21, 2017 at 10:12 PM, Siddharth Mittal <[email protected]> wrote: > Hi Team, > > We want to retain the File name while reading a zip file using TextIO api. > > When we read a Zip file using TextIO API we get PCollection of all lines > of all files but the file name is not present . > > If we have a Zip file which contains four files inside that lets say > file1.csv , file2.csv , file3.csv and file4.csv. > > In output we want PCollection <filename , String(csv Line)> > > > Please suggest . > > Thanks & Regards > > Siddharth Mittal > Senior Associate | Sapient > Gurgaon SEZ | India > Mobile : +91-987-391-9917 > >
