mavestergaard commented on issue #538:
URL: https://github.com/apache/arrow-adbc/issues/538#issuecomment-1482885827
Unfortunately, it is not working with pinned version. And there seems to be
something wrong with the Polars code.
It is doing:
```
cursor.close()
conn.commit()
```
Shouldn't it be somehting like (or with context manager as I am posting in
the code below)
```
cursor.commit()
cursor.close()
```
With the below workaround I got a different error, which I can't find any
context on. Can you help with that?
The error is:
```
File "adbc_driver_manager/_lib.pyx", line 371, in
adbc_driver_manager._lib.check_error
adbc_driver_manager._lib.NotSupportedError: ADBC_STATUS_NOT_IMPLEMENTED (2):
[libpq] Field #1 ('text') has unsupported parameter type 35
```
The text column in db is varchar(16)
The code that almost works:
```
import adbc_driver_postgresql.dbapi as adbc
with adbc.connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.adbc_ingest("schema.mytable", df.to_arrow(), "append")
print("insert completed")
```
Any help is really appreciated!!
--
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]