From ac7eba1b886fa8a21fd810fb2f4eceefc74d7bf0 Mon Sep 17 00:00:00 2001 From: Florian Valeye Date: Wed, 22 Apr 2026 13:40:53 +0200 Subject: [PATCH 1/2] feat: add additional_catalogs parameter to Client --- src/altertable_flightsql/client.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/altertable_flightsql/client.py b/src/altertable_flightsql/client.py index b75a424..998fada 100644 --- a/src/altertable_flightsql/client.py +++ b/src/altertable_flightsql/client.py @@ -108,6 +108,7 @@ def __init__( *, catalog: Optional[str] = "altertable", schema: Optional[str] = "main", + additional_catalogs: Optional[Sequence[str]] = None, host: str = "flight.altertable.ai", port: int = 443, tls: bool = True, @@ -121,6 +122,8 @@ def __init__( password: Altertable password (required). catalog: Default catalog name (default: "altertable"). schema: Default schema name (default: "main"). + additional_catalogs: Extra server-side catalogs to attach to + this session alongside ``catalog`` (default: None). host: Altertable server hostname (default: "flight.altertable.ai"). port: Server port (default: 443). tls: Whether to use TLS/SSL (default: True). @@ -156,6 +159,13 @@ def __init__( if schema: options["schema"] = sql_pb2.SessionOptionValue(string_value=schema) + if additional_catalogs: + options["additional_catalogs"] = sql_pb2.SessionOptionValue( + string_list_value=sql_pb2.SessionOptionValue.StringListValue( + values=list(additional_catalogs), + ), + ) + if options: self._set_options(options) From 4aefe03f0648040764a71230647db6a1c9115422 Mon Sep 17 00:00:00 2001 From: Florian Valeye Date: Wed, 22 Apr 2026 16:21:34 +0200 Subject: [PATCH 2/2] feat: attach all user-allowed catalogs by default --- src/altertable_flightsql/client.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/altertable_flightsql/client.py b/src/altertable_flightsql/client.py index 998fada..a64397a 100644 --- a/src/altertable_flightsql/client.py +++ b/src/altertable_flightsql/client.py @@ -106,9 +106,8 @@ def __init__( username: str, password: str, *, - catalog: Optional[str] = "altertable", - schema: Optional[str] = "main", - additional_catalogs: Optional[Sequence[str]] = None, + catalog: Optional[str] = None, + schema: Optional[str] = None, host: str = "flight.altertable.ai", port: int = 443, tls: bool = True, @@ -120,10 +119,12 @@ def __init__( Args: username: Altertable username (required). password: Altertable password (required). - catalog: Default catalog name (default: "altertable"). - schema: Default schema name (default: "main"). - additional_catalogs: Extra server-side catalogs to attach to - this session alongside ``catalog`` (default: None). + catalog: Default catalog for the session. When ``None`` (default), + the server attaches every catalog the authenticated user is + authorized for. Pass an explicit name to bind the session to a + single catalog. + schema: Default schema for unqualified table references. When + ``None`` (default), no schema is pre-selected. host: Altertable server hostname (default: "flight.altertable.ai"). port: Server port (default: 443). tls: Whether to use TLS/SSL (default: True). @@ -159,13 +160,6 @@ def __init__( if schema: options["schema"] = sql_pb2.SessionOptionValue(string_value=schema) - if additional_catalogs: - options["additional_catalogs"] = sql_pb2.SessionOptionValue( - string_list_value=sql_pb2.SessionOptionValue.StringListValue( - values=list(additional_catalogs), - ), - ) - if options: self._set_options(options)