Skip to content

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.

  • account

    (str) - Snowflake account identifier.
  • warehouse

    (str) - Snowflake warehouse name.
  • token

    (str or SecretStr) - OAuth access token.

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",
... }
... })
OAuthAuthSnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure snowflake auth
            └──  Configure OAuth authentication