UsernamePasswordMFAAuth
relationalai.config.connections.snowflake
Configure Snowflake access using a username/password and an MFA passcode.
Use this authenticator when your Snowflake sign-in requires a time-based MFA
code. When loading from a config dict or file, set
authenticator="username_password_mfa".
Instantiating this class is optional; you can also pass an equivalent dict to
create_config.
Parameters
Section titled “Parameters”
(accountstr) - Snowflake account identifier.
(warehousestr) - Snowflake warehouse name.
(userstr) - Snowflake username.
(passwordstr or SecretStr) - Snowflake password.
(passcodestr) - MFA passcode (typically a 6-digit code).
Examples
Section titled “Examples”Create a programmatic config using this authenticator class:
>>> from relationalai.config import Config, UsernamePasswordMFAAuth>>> cfg = Config(connections={... "sf": UsernamePasswordMFAAuth(... account="my_account",... warehouse="my_warehouse",... user="my_user",... password="my_password",... passcode="123456",... )... })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_mfa",... "account": "my_account",... "warehouse": "my_warehouse",... "user": "my_user",... "password": "my_password",... "passcode": "123456",... }... })Inheritance Hierarchy
Section titled “Inheritance Hierarchy”Used By
Section titled “Used By”config > connections > snowflake └── SnowflakeAuthenticator
Referenced By
Section titled “Referenced By”RelationalAI Documentation └── Build With RelationalAI └── Understand how PyRel works > Configure PyRel └── Configure snowflake auth └── Configure username/password authentication with MFA