Skip to content

InjectedSessionAuth

relationalai.config.connections.snowflake

Configure a Snowflake connection with no credential material, for callers who authenticate outside PyRel and inject an already-built Snowpark session.

Use this authenticator when your own code owns Snowflake authentication (for example, a service holding a key pair from a secrets manager, never written to disk) and you inject the resulting session via create_config’s snowflake_session argument. When loading from a config dict or file, set authenticator="session".

This connection never attempts to authenticate on its own. If no session has been injected, or a previously injected session becomes invalid, accessing the session raises SnowflakeSessionRequiredError instead of falling back to any credential field or config-file discovery.

Parameters

  • account

    (str) - Snowflake account identifier.
  • warehouse

    (str) - Snowflake warehouse name.
  • user

    (str) - Snowflake username associated with the injected session.

Examples

from relationalai.config import create_config, InjectedSessionAuth
cfg = create_config(
connections={
"sf": InjectedSessionAuth(
account="my_account",
warehouse="my_warehouse",
user="my_user",
role="my_role",
)
},
snowflake_session=my_snowpark_session,
)

Inheritance Hierarchy

InjectedSessionAuthSnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC

Used By