diff --git a/sdks/python/apache_beam/io/localfilesystem.py b/sdks/python/apache_beam/io/localfilesystem.py index e9fe7dd4b1c2..5525f3b96f1d 100644 --- a/sdks/python/apache_beam/io/localfilesystem.py +++ b/sdks/python/apache_beam/io/localfilesystem.py @@ -364,3 +364,9 @@ def try_delete(path): if exceptions: raise BeamIOError("Delete operation failed", exceptions) + + def report_lineage(self, path, lineage, level=None): + if level == FileSystem.LineageLevel.TOP_LEVEL: + lineage.add('filesystem', 'localhost') + else: + lineage.add('filesystem', 'localhost', path, last_segment_sep='/')