Reputation: 349
I'm attempting to convert a Firebird database to SQL, and my first goal is to read in the database via SQLAlchemy. It looks like I have all the libraries I need, but when I attempt the following code:
from sqlalchemy import create_engine
from sqlalchemy.dialects.firebird.base import dialect
engine = create_engine('firebird+fdb://localhost/C:/Temp/TEST.GDB')
I get this error:
sqlalchemy.exc.ArgumentError: Could not determine dialect for 'firebird+fdb'.
Upvotes: 0
Views: 1203
Reputation: 11
first of all install module:
pip install sqlalchemy-firebird
then use:
engine = create_engine('firebird://localhost/C:/Temp/TEST.GDB')
without "+fdb"
instead of: engine = create_engine('firebird+fdb://localhost/C:/Temp/TEST.GDB')
that worked for me
Also you can use: df = pd.DataFrame(engine.connect().execute(text(sql)))
Upvotes: 1
Reputation: 11
FDB support has been added in SQLAlchemy version 0.8:
New in version 0.8: - Support for the fdb Firebird driver.
Upvotes: 1