MMCMA opened a new issue, #2079:
URL: https://github.com/apache/arrow-adbc/issues/2079
### What would you like help with?
I am curious if there is a way to use SQLAlchemy along the ADBC driver for
our postgres database. Often in SQLAlchemy I can switch between drivers by
simply altering the create_engine() call. We have a lot of SQL logic written
with SQLAlchemy queries (which allow us to switch between different SQL
flavors). I tried to make it work with the connection object but it does not
really work. I get errors like the following.
`sqlalchemy.exc.NoInspectionAvailable: No inspection system is available for
object of type <class 'adbc_driver_manager.dbapi.Connection'>`
an example code could look like this
from sqlalchemy import MetaData, Table, select, Column, Integer
from adbc_driver_postgresql import dbapi
import pandas as pd
with dbapi.connect('some_valid_DB_URL') as con
metadata = MetaData()
tmp_id_table = Table('tmp_table', metadata,
Column('id_', Integer, primary_key=True),
prefixes=['TEMPORARY'])
metadata.create_all(con)
tmp_ids = pd.DataFrame(dict(id_=[1,2,3,4]))
tmp_ids.to_sql('tmp_table', con=con, if_exists='append',
index=False)
--
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]