Skip to content

The agent engineering platform.

fix(sql_database): related to #2020 (#2021)

Clarke0331b55bb8a
diff --git a/langchain/sql_database.py b/langchain/sql_database.py
index 18f76bd2ba..424f789aa1 100644
--- a/langchain/sql_database.py
+++ b/langchain/sql_database.py
@@ -124,7 +124,7 @@ class SQLDatabase:
if self._sample_rows_in_table_info:
# build the select command
- command = select(table).limit(self._sample_rows_in_table_info)
+ command = select([table]).limit(self._sample_rows_in_table_info)
# save the columns in string format
columns_str = "\t".join([col.name for col in table.columns])