Skip to content

Commit e621f12

Browse files
committed
fix: accept comma or newline separated tables in create_managed_database tool
1 parent dc5cf97 commit e621f12

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ print(result.content) # JSON rows
4949
tools["hotdata_create_managed_database"].call(
5050
name="sales",
5151
schema_name="public",
52-
tables="orders\ncustomers",
52+
tables="orders,customers",
5353
)
5454

5555
tools["hotdata_load_managed_table"].call(

hotdata_llamaindex/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def hotdata_create_managed_database(
5858
schema_name: str = DEFAULT_SCHEMA,
5959
tables: str = "",
6060
) -> str:
61-
"""Create a Hotdata-managed database and optionally declare tables (one per line)."""
62-
table_names = [line.strip() for line in tables.splitlines() if line.strip()]
61+
"""Create a Hotdata-managed database and optionally declare tables (comma or newline separated)."""
62+
table_names = [t.strip() for t in tables.replace(",", "\n").splitlines() if t.strip()]
6363
db = create_managed_database(
6464
client,
6565
name=name,

0 commit comments

Comments
 (0)