When running RelationalAI in a Docker image, the path to the raiconfig.toml file in the container may be different than when configured locally.
In that case, the configuration can be specified in python either as part of the model or the provider. Examples of each are included below.
Set the configuration object as part of the model:
import relationalai as rai
cfg = rai.Config({
"platform": "snowflake",
"authenticator": "snowflake",
"user": "my_username",
"password": "my_password",
"account": "my_account_id",
"role": "my_role",
"warehouse": "my_warehouse",
"rai_app_name": "relationalai",
})
model = rai.Model("Example", config=cfg)
Set the configuration object as part of the app's provider:
import relationalai as rai
cfg = rai.Config({
"platform": "snowflake",
"authenticator": "snowflake",
"user": "my_username",
"password": "my_password",
"account": "my_account_id",
"role": "my_role",
"warehouse": "my_warehouse",
"rai_app_name": "relationalai",
})
app = Provider(config=cfg)
Error Message
If incorrectly configured you may receive an error message similar to:
snowflake.connector.errors.ProgrammingError: 251005: User is empty.
Related Documentation
For more information see these documents.
- RelationalAI Configuration Guide: Configuration Objects
- RelationalAI Python Reference: Model
- RelationalAI Python Reference: Provider