diff --git a/pyiceberg/table/__init__.py b/pyiceberg/table/__init__.py index c171b39c26..fe89915998 100644 --- a/pyiceberg/table/__init__.py +++ b/pyiceberg/table/__init__.py @@ -529,6 +529,13 @@ def location(self) -> str: """Return the table's base location.""" return self.metadata.location + @property + def last_sequence_number(self) -> int: + return self.metadata.last_sequence_number + + def next_sequence_number(self) -> int: + return INITIAL_SEQUENCE_NUMBER if self.format_version == 1 else self.last_sequence_number + 1 + def new_snapshot_id(self) -> int: """Generate a new snapshot-id that's not in use.""" snapshot_id = _generate_snapshot_id()