diff --git a/sdks/python/apache_beam/io/fileio.py b/sdks/python/apache_beam/io/fileio.py index 7c8350743267..a333b7c89775 100644 --- a/sdks/python/apache_beam/io/fileio.py +++ b/sdks/python/apache_beam/io/fileio.py @@ -313,9 +313,10 @@ def expand(self, pbegin) -> beam.PCollection[filesystem.FileMetadata]: fire_interval=self.interval) # match file pattern periodically + file_pattern = self.file_pattern match_files = ( impulse - | 'GetFilePattern' >> beam.Map(lambda x: self.file_pattern) + | 'GetFilePattern' >> beam.Map(lambda x: file_pattern) | MatchAll(self.empty_match_treatment)) # apply deduplication strategy if required