GitHub user WillAyd edited a comment on the discussion: Inserting iterables of 
Python objects into PostgreSQL - COPY?

Generally I think its best to wrap the iterable(s) in an arrow structure. It 
doesn't necessarily need to be a Table; RecordBatch and RecordBatchReader 
objects work just as well (really anything that implements the[ Arrow PyCapsule 
Interface](https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html))

Behind the scenes the ADBC postgres driver issues a COPY command anyway, but if 
you route it through an Arrow structure it can communicate with the database 
using the binary format, whereas I (perhaps mistakenly) assume a manual COPY 
from stdin is going to use the text-based protocol

GitHub link: 
https://github.com/apache/arrow-adbc/discussions/2897#discussioncomment-13324896

----
This is an automatically sent email for user@arrow.apache.org.
To unsubscribe, please send an email to: user-unsubscr...@arrow.apache.org

Reply via email to