Postgres 'virtual' persistence error when running get_table_info() for SQLDatabase #26437
Replies: 1 comment 2 replies
-
Hey there, @BrandenKeck! I'm here to help you with any bugs, questions, or contribution assistance you might need. Let's tackle this issue together! To resolve the Here is an example of how to use import os
from langchain_community.utilities import SQLDatabase
user = os.getenv("USER")
pwd = os.getenv("PWD")
db = SQLDatabase.from_uri(
f"denodo://{user}:{pwd}@my.url.com:0000/database",
include_tables=["my_table"],
lazy_table_reflection=True
)
# Now you can call get_table_info without encountering the CompileError
table_info = db.get_table_info()
print(table_info) By using |
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 the SQLDatabase class to connect to a Denodo (https://www.denodo.com/en) database. The connection works using the above URI structure and I can query data using
db.run(...)
just fine. My problem is that I would like to invoke the following pipeline:Which appears to depend on:
And, when this function is called, I get the following Error:
Any help with this would be extremely appreciated. The full traceback is as follows:
System Info
langchain==0.2.15
langchain-community==0.2.15
langchain-core==0.2.37
langchain-text-splitters==0.2.2
Ubuntu 22.04
Py3.10.14
Beta Was this translation helpful? Give feedback.
All reactions