Replies: 1 comment 1 reply
-
🤖 Hey there @mtruyols! Nice to bump into you again on these digital crossroads. Hope you’re ready to tackle some code together once more. 🚀 Based on the information provided, it seems like you're trying to specify a schema in the Here's an example of how you can specify a schema when creating an from langchain.sql import SQLDatabase
# Assuming 'engine' is your SQLAlchemy engine
db = SQLDatabase(engine, schema="my_schema") In this example, Unfortunately, the Here's an example of how you can create an engine without specifying a schema: from sqlalchemy import create_engine
engine = create_engine("mssql+pyodbc:///?odbc_connect='Driver={driver};Server=tcp:{server};PORT=1433;DATABASE={database};Uid={username};Pwd={password};Encrypt=yes;TrustServerCertificate=yes;Connection Timeout=300;") In this example, replace After creating the engine, you can then create an I hope this helps! If you have any other questions or need further clarification, feel free to ask. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am trying to use Chat GPT with my SQL data (create_sql_agent) and with odbc_str, but it does not detect all the tables (it only detects the tables under the default schema). Does anyone know how to specify a different schema?
Thank you very much.
System Info
...
urllib3==2.1.0
wcwidth==0.2.12
yarl==1.9.4
Note: you may need to restart the kernel to use updated packages.
Beta Was this translation helpful? Give feedback.
All reactions