Fokko opened a new issue, #980:
URL: https://github.com/apache/iceberg-python/issues/980

   ### Feature Request / Improvement
   
   ```python
   from pyiceberg.types import StringType
   
   try:
       cat.drop_table('default.test3')
   except:
       pass
   
   tbl = cat.create_table(
       'default.test3',
       schema=Schema(
           NestedField(1, 'idx', LongType()),
           NestedField(2, 'ts', TimestampType())
       )
   )
   
   arrow_table = pa.Table.from_arrays([
       pa.array([2, 3, 4, 5, 6]),
       pa.array([
           datetime(2021, 5, 19), 
           datetime(2022, 7, 25),
           datetime(2023, 3, 22),
           datetime(2024, 7, 17),
           datetime(2025, 2, 22)
       ]),
       pa.array(["a", "b", "c", "d", "e"])
   ], names=['id', 'ts', "char"])
   
   with tbl.transaction() as tx:
       with tx.update_schema() as schema:
           schema.union_by_name(
               Schema(
                   NestedField(1, 'id', LongType()),
                   NestedField(2, 'ts', TimestampType()),
                   NestedField(2, 'char', StringType())
               )
           )
       tx.append(arrow_table)
           
   ```


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to