reinthal commented on issue #1084:
URL:
https://github.com/apache/iceberg-python/issues/1084#issuecomment-2423927862
Here's some code that worked for me for me
```python
def append_to_table_with_retry(pa_df: pa.Table, table_name: str, catalog:
Catalog) -> None:
"""Appends a pyarrow dataframe to the table in the catalog using
tenacity exponential backoff."""
@retry(
wait=wait_exponential(multiplier=1, min=4, max=32),
stop=stop_after_attempt(20),
reraise=True
)
def append_with_retry():
table = catalog.load_table(table_name) # <---- If a process appends
between this line ...
table.append(pa_df) # <----- and this line, then Tenacity will retry.
append_with_retry()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]