Skip to content

Commit

Permalink
Add lineage support for local files.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Dec 17, 2024
1 parent b2d4a69 commit 992b054
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdks/python/apache_beam/io/localfilesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='/')

0 comments on commit 992b054

Please sign in to comment.