Skip to content

SnowflakeConnectionBase

relationalai.config.connections.snowflake

Configure a Snowflake Snowpark session.

This abstract base class defines common Snowflake connection fields and provides SnowflakeConnectionBase.get_session to create a Session. Use one of the concrete authenticators (for example UsernamePasswordAuth).

The session is cached on the instance; call BaseConnection.clear_session_cache to force a fresh session on the next access.

Do not instantiate this class directly.

SnowflakeConnectionBase.account: str

Snowflake account identifier.

SnowflakeConnectionBase.warehouse: str

Snowflake warehouse name.

SnowflakeConnectionBase.rai_app_name: (str, optional)

RAI application name in Snowflake (default: “RELATIONALAI”).

SnowflakeConnectionBase.role: (str, optional)

Role to set on the session.

SnowflakeConnectionBase.database: (str, optional)

Default database.

SnowflakeConnectionBase.schema_: (str, optional)

Default schema (set via schema=...).

SnowflakeConnectionBase.get_session() -> snowflake.snowpark.Session

Return a Snowpark session for this connection.

The session is created on first access from this connection’s configuration and cached on the instance. Call BaseConnection.clear_session_cache to force a fresh session on the next access.

Returns:

  • snowflake.snowpark.Session - The configured Snowpark session.
SnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC