From 992abcf1abbc7c325ff3b44d07fbf09e31147bff Mon Sep 17 00:00:00 2001 From: Qinyi Ding Date: Tue, 29 Sep 2026 23:22:06 -0700 Subject: [PATCH] [DOC-11502] Add current-account usage guidance Clarify existing API behavior without changing executable code. Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-authored-by: Snowflake CoCo --- src/snowflake/snowpark/session.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/snowflake/snowpark/session.py b/src/snowflake/snowpark/session.py index a6448b59af..930b7e4c6b 100644 --- a/src/snowflake/snowpark/session.py +++ b/src/snowflake/snowpark/session.py @@ -4302,6 +4302,19 @@ def get_current_account(self) -> Optional[str]: """ Returns the name of the current account for the Python connector session attached to this session. + + The value comes from the attached connection; it isn't a database or + schema name. The returned string depends on the connection's account + configuration. It can be ``None`` if that parameter isn't available. + + Example:: + + >>> account = session.get_current_account() + >>> isinstance(account, (str, type(None))) + True + + Use ``account`` when you need the account configured for an existing + session, rather than creating a new connection to inspect it. """ return self._conn._get_current_parameter("account")