diff --git a/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py b/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py index 9278c46ec9..daf88084e2 100644 --- a/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py +++ b/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py @@ -108,9 +108,10 @@ def connect( db_kwargs : dict, optional Initial database connection parameters. """ - return adbc_driver_manager.AdbcDatabase( - driver=_driver_path(), uri=uri, **(db_kwargs or {}) - ) + kwargs = (db_kwargs or {}).copy() + if uri is not None: + kwargs["uri"] = uri + return adbc_driver_manager.AdbcDatabase(driver=_driver_path(), **kwargs) @functools.cache diff --git a/python/adbc_driver_snowflake/adbc_driver_snowflake/dbapi.py b/python/adbc_driver_snowflake/adbc_driver_snowflake/dbapi.py index 42b9ec08e3..d3ad5c4f2b 100644 --- a/python/adbc_driver_snowflake/adbc_driver_snowflake/dbapi.py +++ b/python/adbc_driver_snowflake/adbc_driver_snowflake/dbapi.py @@ -93,7 +93,7 @@ def connect( - uri: str, + uri: typing.Optional[str] = None, db_kwargs: typing.Optional[typing.Dict[str, str]] = None, conn_kwargs: typing.Optional[typing.Dict[str, str]] = None, **kwargs, @@ -103,7 +103,7 @@ def connect( Parameters ---------- - uri : str + uri : str, optional The URI to connect to. db_kwargs : dict, optional Initial database connection parameters.