JWTAuth
relationalai.config.connections.snowflake
Configure Snowflake access using key-pair (JWT) authentication.
Use this authenticator when you sign in to Snowflake with a private key
instead of a password. When loading from a config dict or file, set
authenticator="jwt".
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.
(private_key_pathstr) - Path to a PEM-encoded private key file.
(private_key_passphrasestr or SecretStr) - Passphrase for the private key file, if encrypted.
Examples
Section titled “Examples”Create a programmatic config using this authenticator class:
>>> from relationalai.config import Config, JWTAuth>>> cfg = Config(connections={... "sf": JWTAuth(... account="my_account",... warehouse="my_warehouse",... user="my_user",... private_key_path="/path/to/key.pem",... )... })Create a programmatic config using a plain dict (no authenticator import):
>>> from relationalai.config import Config>>> cfg = Config(connections={... "sf": {... "type": "snowflake",... "authenticator": "jwt",... "account": "my_account",... "warehouse": "my_warehouse",... "user": "my_user",... "private_key_path": "/path/to/key.pem",... }... })The private key file is read from private_key_path when creating the
Snowpark session.
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 key-pair authentication