Skip to content

Commit 5982d1f

Browse files
committed
Pass write_disposition through to write_table
1 parent 54473b0 commit 5982d1f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • elt-common/src/elt_common/dlt_destinations/pyiceberg

elt-common/src/elt_common/dlt_destinations/pyiceberg/pyiceberg.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def iceberg_catalog(self) -> PyIcebergCatalog:
5959
return self.iceberg_client.iceberg_catalog
6060

6161
def run(self):
62-
self.iceberg_client.write_to_table(self.load_table_name, pq.read_table(self._file_path))
62+
self.iceberg_client.write_to_table(
63+
self.load_table_name,
64+
pq.read_table(self._file_path),
65+
self._load_table.get("write_disposition"),
66+
)
6367

6468

6569
class PyIcebergClient(JobClientBase, WithStateSync):
@@ -384,7 +388,7 @@ def write_to_table(
384388
table.append(table_data)
385389
else:
386390
raise DestinationTerminalException(
387-
"Unsupported write disposition {write_disposition} for pyiceberg destination."
391+
f"Unsupported write disposition {write_disposition} for pyiceberg destination."
388392
)
389393

390394
@pyiceberg_error

0 commit comments

Comments
 (0)