port undefined error in SQLDatabase.from_databricks (langchain.sql_database)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 07:15 AM
The following assignment:
from langchain.sql_database import SQLDatabase
dbase = SQLDatabase.from_databricks(
catalog=catalog,
schema=db,
host=host,
api_token=token,
)
fails with
as shown in the error trace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 08:01 AM
Hi @Retired_mod
You may be right regarding SQLAlchemy, the trace hints at something related:
> /lib/python3.10/site-packages/langchain_community/utilities/sql_database.py", line 133, in from_uri
> """Construct a SQLAlchemy engine from URI."""
But I don't get why in the SQLDatabase.from_databricks documentation there is no mention of any port parameter, neither in the example notebooks?
Thanks,
Octavian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 12:44 AM
I am also facing the same issue. not able to connect even after using sqlalchemy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 12:46 AM
SQL alchemy url: databricks+https://<token>@abc.cloud.databricks.com:443/sql/1.0/warehouses/9265c8e0?catalog=customer&schema=chatbot