Skip to content

ProgrammaticAccessTokenAuth

relationalai.config.connections.snowflake

Configure Snowflake access using a Programmatic Access Token.

Use this authenticator when you have a Snowflake Programmatic Access Token. When loading from a config dict or file, set authenticator="programmatic_access_token".

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) - Programmatic Access Token.

Create a programmatic config using this authenticator class:

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

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

>>> from relationalai.config import Config
>>> cfg = Config(connections={
... "sf": {
... "type": "snowflake",
... "authenticator": "programmatic_access_token",
... "account": "my_account",
... "warehouse": "my_warehouse",
... "token": "my_pat",
... }
... })
ProgrammaticAccessTokenAuthSnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure snowflake auth
            └──  Configure programmatic access token authentication