diff --git a/README.md b/README.md index 2bdfeac..337a51d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ print(result.content) # JSON rows tools["hotdata_create_managed_database"].call( name="sales", schema_name="public", - tables="orders\ncustomers", + tables="orders,customers", ) tools["hotdata_load_managed_table"].call( diff --git a/hotdata_llamaindex/tools.py b/hotdata_llamaindex/tools.py index 58b6d49..ad46de4 100644 --- a/hotdata_llamaindex/tools.py +++ b/hotdata_llamaindex/tools.py @@ -58,8 +58,8 @@ def hotdata_create_managed_database( schema_name: str = DEFAULT_SCHEMA, tables: str = "", ) -> str: - """Create a Hotdata-managed database and optionally declare tables (one per line).""" - table_names = [line.strip() for line in tables.splitlines() if line.strip()] + """Create a Hotdata-managed database and optionally declare tables (comma or newline separated).""" + table_names = [t.strip() for t in tables.replace(",", "\n").splitlines() if t.strip()] db = create_managed_database( client, name=name,