From 35bacdd57e15effe76305a1704c4ebc8faa94593 Mon Sep 17 00:00:00 2001 From: LuQQiu Date: Sun, 8 Dec 2024 20:00:23 -0800 Subject: [PATCH] feat: support azure account name storage options in sync db.connect (#1926) db.connect with azure storage account name is supported in async connect but not sync connect. Add this functionality --------- Co-authored-by: Will Jones --- python/python/lancedb/__init__.py | 1 + python/python/lancedb/remote/db.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/python/lancedb/__init__.py b/python/python/lancedb/__init__.py index fb266a01..49149bf1 100644 --- a/python/python/lancedb/__init__.py +++ b/python/python/lancedb/__init__.py @@ -110,6 +110,7 @@ def connect( # TODO: remove this (deprecation warning downstream) request_thread_pool=request_thread_pool, client_config=client_config, + storage_options=storage_options, **kwargs, ) diff --git a/python/python/lancedb/remote/db.py b/python/python/lancedb/remote/db.py index d79aacd9..1dfa1c9a 100644 --- a/python/python/lancedb/remote/db.py +++ b/python/python/lancedb/remote/db.py @@ -44,9 +44,9 @@ class RemoteDBConnection(DBConnection): client_config: Union[ClientConfig, Dict[str, Any], None] = None, connection_timeout: Optional[float] = None, read_timeout: Optional[float] = None, + storage_options: Optional[Dict[str, str]] = None, ): """Connect to a remote LanceDB database.""" - if isinstance(client_config, dict): client_config = ClientConfig(**client_config) elif client_config is None: @@ -94,6 +94,7 @@ class RemoteDBConnection(DBConnection): region=region, host_override=host_override, client_config=client_config, + storage_options=storage_options, ) )