Skip to main content
Solved

How to use SQLAlchemy 2.0 library with CData Python connector.

  • October 25, 2023
  • 1 reply
  • 86 views

Forum|alt.badge.img

When using the Python connector in conjunction with SQLAlchemy, we introduced a new dialect with the "_2" suffix to accommodate SQLAlchemy 2.0. For instance, the QB Python connector features a dialect named "quickbooks_2."

Previously, we utilized automap_base in the following manner:

engine = create_engine("quickbooks:///?<connection string>")

However, if the customer wishes to employ SQLAlchemy 2.0 and prevent potential errors when using automap_base, the following code should be used:

engine = create_engine("quickbooks_2:///?<connection string>")

Best answer by Ankit Singh

Thanks for sharing, @Venu!

This topic has been closed for replies.

1 reply

Ankit Singh
Forum|alt.badge.img+1
  • Employee
  • Answer
  • October 25, 2023

Thanks for sharing, @Venu!