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

   Sorry, I double-checked the Java implementation, and it's correct on the 
Python side.
   
   @apersilva, for your case, I believe you need to do something like this:
   
   ```
   from pyiceberg.io.pyarrow import schema_to_pyarrow
   
   schema = schema_to_pyarrow(tabela.schema())
   
   df = pa.Table.from_pylist(
       [
           {
               "nome_tabela": table_name,
               "nome_base_dados": database_name,
               "particao": partition_by,
               "numero_registro": size,
               "process_date": process_date,
               "particao_customizada": custom_partition,
               "data_criacao": datetime.now().date()
           }
       ],
       schema=schema
   )
   
   tabela.append(df)
   ````
   
   In a future release, there will be a function in the Schema object to return 
the Arrow schema, so it would look like this: `schema = 
tabela.schema().as_arrow()`


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

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