Skip to content
These docs are for v1 of RelationalAI. Click here to view the v2 docs.

OAuthAuth

relationalai.config.connections.snowflake

Configure Snowflake access using an OAuth access token.

Use this authenticator when you already have an OAuth token for Snowflake. When loading from a config dict or file, set authenticator="oauth".

Instantiating this class is optional; you can also pass an equivalent dict to create_config.

Parameters

  • account

    (str) - Snowflake account identifier.
  • warehouse

    (str) - Snowflake warehouse name.
  • token

    (str or SecretStr) - OAuth access token.

Examples

Create a programmatic config using this authenticator class:

from relationalai.config import Config, OAuthAuth
cfg = Config(
connections={
"sf": OAuthAuth(
account="my_account",
warehouse="my_warehouse",
token="my_oauth_token",
)
}
)

Create a programmatic config using a plain dict (no authenticator import):

from relationalai.config import Config
cfg = Config(
connections={
"sf": {
"type": "snowflake",
"authenticator": "oauth",
"account": "my_account",
"warehouse": "my_warehouse",
"token": "my_oauth_token",
}
}
)

Inheritance Hierarchy

OAuthAuthSnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC

Used By