Skip to content

Commit 294dfcc

Browse files
authored
[Fix] Fix DuckDB datasource creation from Web UI (#3009)
Co-authored-by: honglei <honglei@users.noreply.github.com>
1 parent a3f2135 commit 294dfcc

File tree

2 files changed

+4
-2
lines changed
  • packages

2 files changed

+4
-2
lines changed

packages/dbgpt-core/src/dbgpt/datasource/rdbms/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ def _sync_tables_from_db(self) -> Iterable[str]:
228228

229229
# SQL will raise error with schema
230230
_schema = (
231-
None if self.db_type == DBType.SQLite.value() else self._engine.url.database
231+
None
232+
if self.db_type in (DBType.SQLite.value(), DBType.DuckDb.value())
233+
else self._engine.url.database
232234
)
233235
# including view support by adding the views as well as tables to the all
234236
# tables list if view_support is True

packages/dbgpt-ext/src/dbgpt_ext/datasource/rdbms/conn_duckdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def from_parameters(
5959
cls, parameters: DuckDbConnectorParameters
6060
) -> "DuckDbConnector":
6161
"""Create a new DuckDBConnector from parameters."""
62-
return cls.from_uri(parameters.path)
62+
return cls.from_uri(parameters.db_url())
6363

6464
@classmethod
6565
def from_file_path(

0 commit comments

Comments
 (0)