hwchase17 / sql-qa

45 stars 13 forks source link

Connecting to a database server #1

Open BuggieCoder opened 1 year ago

BuggieCoder commented 1 year ago

Great addition to Langchain! Our database however, is too large to be recreated in a repo, and can only be connected to using SQL authentication. Does the db chain have the ability to connect to enterprise SQL database? Can you point us to relevant documentation? Thanks!

nuhilmehdy commented 1 year ago

It is already supported by the SQLDatabase class. You can make use of its form_uri method to construct a SQLAlchemy engine from an URI. More: https://api.python.langchain.com/en/latest/utilities/langchain.utilities.sql_database.SQLDatabase.html