ndrluis commented on issue #1020:
URL: 
https://github.com/apache/iceberg-python/issues/1020#issuecomment-2274610759

   @Minfante377 I was able to reproduce the code.
   
   ```python
   from pyiceberg.catalog import load_catalog
   import pyarrow as pa
   from pyiceberg.schema import Schema
   from pyiceberg.types import NestedField, StringType, DoubleType
   from pyiceberg.expressions import In
   
   catalog = load_catalog(
       "demo",
       **{
           "type": "rest",
           "uri": "http://localhost:8181";,
           "s3.endpoint": "http://localhost:9000";,
           "s3.access-key-id": "admin",
           "s3.secret-access-key": "password",
           "warehouse": "demo",
       },
   )
   
   catalog.create_namespace_if_not_exists("default")
   
   schema = Schema(
       NestedField(1, "id", StringType(), required=True),
       NestedField(2, "name", StringType(), required=False),
       identifier_field_ids=[1],
   )
   
   tbl = catalog.create_table_if_not_exists("default.overrite_test", 
schema=schema)
   
   df = pa.Table.from_pylist(
       [
           {"id": "1", "name": "Amsterdam"},
           {"id": "2", "name": "San Francisco"},
           {"id": "3", "name": "Drachten"},
       ],
       schema=schema.as_arrow(),
   )
   
   tbl.append(df)
   
   df = pa.Table.from_pylist(
       [
           {"id": "1", "name": "Amsterdam"},
           {"id": "2", "name": "San Francisco"},
           {"id": "3", "name": "Drachten"},
       ],
       schema=schema.as_arrow(),
   )
   
   overwrite_filter = In("id", df.to_pandas()["id"].to_list())
   tbl.overwrite(df, overwrite_filter=overwrite_filter)
   ```


-- 
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]

Reply via email to