Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/snowflake/snowpark/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Loading