I am working on one solution where requirement is to create SQL queries from natural language using gpt-turbo-3.5 LLM. During this I am connecting AdventureWorks2017 database which has 60+ tables and tables are categorized based on the schemas.
I am using LangChain SqlDatabse to connect to my SQL Server databse. during this process we need to prepare the prompt with the databse tables and columns for generating SQL queries.
SQLDatabse module fetches tables which are under the dbo schema only and not fetching other tables under different schemas. While looking the code I see LanhChain SQLDatabse module is wrapper on the SQLDatabaseAlchemy. SQLDatabaseAlchemy support only single schema, there is no way to fetch tables under different schemas available in database.
Please suggest me how can I read all the tables from database under all the schemas. Down is the database snap shot.