FerriLuli opened a new issue, #34505:
URL: https://github.com/apache/arrow/issues/34505

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Hi everyone.
   I am trying to take data from one database using polars dataframe with Arrow 
data types and write it in another database using the method write_database 
from polars that runs the method to_sql from pandas in the back and I'm getting 
an error when my dataframe contains a datetime type column. 
   
   This is my code:
   
   `import polars as pl`
   `query = "SELECT getdate(), t.* FROM table "`
   `df_sql = pl.read_sql(query, conn_uri_db1)`
   `df_sql.schema`
   `df_sql.to_pandas(use_pyarrow_extension_array=True).to_sql('table_name', 
conn_uri_db2, if_exists='replace')`
   
   >Error message: 'ArrowExtensionArray' object has no attribute 'to_pydatetime'
   
   ### Component(s)
   
   Python


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

Reply via email to