We have some processing pipelines where we want to know the file path that each record being processed came from. It would be nice if this could be exposed to the DoFns in our pipelines.
This same desire was expressed a little over 1 year ago on the mailing list:
Unfortunately, that thread dead-ended.
I will use the comments section and a patch to propose a simple, albeit slightly hacky solution. Another alternative would be to create a new Source that provides a PCollection<Pair<Path, Record>>, but I'm not sure of the effort it would take to create that.