mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-07-17 10:16:49 +00:00
[Fix] Fix DuckDB datasource creation from Web UI (#3009)
Co-authored-by: honglei <honglei@users.noreply.github.com>
This commit is contained in:
@@ -228,7 +228,9 @@ class RDBMSConnector(BaseConnector):
|
||||
|
||||
# SQL will raise error with schema
|
||||
_schema = (
|
||||
None if self.db_type == DBType.SQLite.value() else self._engine.url.database
|
||||
None
|
||||
if self.db_type in (DBType.SQLite.value(), DBType.DuckDb.value())
|
||||
else self._engine.url.database
|
||||
)
|
||||
# including view support by adding the views as well as tables to the all
|
||||
# tables list if view_support is True
|
||||
|
||||
@@ -59,7 +59,7 @@ class DuckDbConnector(RDBMSConnector):
|
||||
cls, parameters: DuckDbConnectorParameters
|
||||
) -> "DuckDbConnector":
|
||||
"""Create a new DuckDBConnector from parameters."""
|
||||
return cls.from_uri(parameters.path)
|
||||
return cls.from_uri(parameters.db_url())
|
||||
|
||||
@classmethod
|
||||
def from_file_path(
|
||||
|
||||
Reference in New Issue
Block a user