Skip to content

UsernamePasswordAuth

relationalai.config.connections.snowflake

Configure Snowflake access using a username and password.

Use this authenticator when you sign in to Snowflake with a password. You can instantiate this class directly (for example, when building a create_config programmatically), or provide a config dict and let create_config validate and create it.

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

When loading from a config dict or file, set authenticator="username_password".

  • account

    (str) - Snowflake account identifier.
  • warehouse

    (str) - Snowflake warehouse name.
  • user

    (str) - Snowflake username.
  • password

    (str or SecretStr) - Snowflake password.

Create a programmatic config using this authenticator class:

>>> from relationalai.config import Config, UsernamePasswordAuth
>>> cfg = Config(connections={
... "sf": UsernamePasswordAuth(
... account="my_account",
... warehouse="my_warehouse",
... user="my_user",
... password="my_password",
... )
... })

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

>>> from relationalai.config import Config
>>> cfg = Config(connections={
... "sf": {
... "type": "snowflake",
... "authenticator": "username_password",
... "account": "my_account",
... "warehouse": "my_warehouse",
... "user": "my_user",
... "password": "my_password",
... }
... })
UsernamePasswordAuthSnowflakeConnectionBaseBaseConnectionpydantic.BaseModelabc.ABC
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure snowflake auth
            └──  Configure username/password authentication