I have some side inputs that I would like to add to my pipeline. Some of them are based on a file pattern, so I found that I can collect the contents of those files using a pattern like the following:
val genotypes = p.apply(FileIO.`match`.filepattern(opts.getGenotypesFilePattern())) .apply(FileIO.readMatches) .apply("ReadGenotypesFile", ParDo.of(new ReadFileAsBytes())) .apply("UnmarshalGenotypes", ParDo.of(new UnmarshalGenotypesDoFn())) .apply("GenotypesAsMap", Combine.globally[Genotypes, ibd.GenotypesMap](new CombineGenotypesFn)) .apply("ViewAsGeneticMap", View.asSingleton[ibd.GenotypesMap]) (the code snippet is Scala...) I have another input - just a single file containing some protobuf. How do I construct a single FileIO.ReadableFile rather than using the "match"? Trying to avoid CombineGlobally - I assume that would be more correct to let Beam know the expected data and perhaps more performant. Thanks in advance, rdm