Skip to content

Commit

Permalink
add version to DeltaTableResource
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Jan 20, 2024
1 parent 4302375 commit 7fa6bcd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ def my_table(delta_table: DeltaTableResource):
default=None, description="Additional configuration passed to http client."
)

version: Optional[int]

def load(self) -> DeltaTable:
storage_options = self.storage_options.dict() if self.storage_options else {}
client_options = self.client_options.dict() if self.client_options else {}
options = {**storage_options, **client_options}
table = DeltaTable(table_uri=self.url, storage_options=options)
table = DeltaTable(table_uri=self.url, storage_options=options, version=self.version)
return table

0 comments on commit 7fa6bcd

Please sign in to comment.