Snowflake stage
Index documents uploaded on your Snowflake stage
Need : Snowflake admin
General case (use a Snowflake Stage on the KAI SaaS Version)
Create a snowflake user
Create an programatic access token for this user
https://docs.snowflake.com/en/user-guide/programmatic-access-tokens
Create a role to access to the snowflake stage
https://docs.snowflake.com/en/sql-reference/sql/create-stage#access-control-requirements
Attach the role to the user
Final output :
account : The account identifier of your snowflake tenant retrieved on step 5
database : The database name where is holded the stage
schema : the schema name where is holded the stage
role : the role who has access to the stage and granted to the user on step 3
user : the username of the created snowflake user on step 1
password : the programatic access token created on step 2
stage name : the name of the stage you want to connect
type : EXTERNAL
In case you want to connect a Snowflake Stage with KAI app through Snowflake
In this case, we will use the snowflake rules management and give access to the Snowflake stage you want to connect with the KAI app through Snowflake rules.
Need : Snowflake Admin
Configure the stage for the KAI app
When you deploy KAI app, a app name is asked to configure (and only visible on your side), note it down.
consumer_db = the database where your stage is
consumer_schema = the schema where your stage is
consumer_stage = your snowflake stage name
app_name = the name you choose when you deploy KAI on your snowflake account.
GRANT USAGE ON DATABASE <consumer_db> TO APPLICATION <app_name>;
GRANT USAGE ON SCHEMA <consumer_db>.<consumer_schema> TO APPLICATION <app_name>;
GRANT READ ON STAGE <consumer_db>.<consumer_schema>.<consumer_stage> TO APPLICATION <app_name>;These commands will give the possibility to the KAI app to read documents of your Snowflake Stage.
Final output :
account : put "account" (will not be used, the value is not a matther)
database : consumer_db
schema : consumer_schema
role : put "role" (will not be used, the value is not a matter)
user : put "user" (will not be used, the value is not a matter)
password : put "password" (will not be used, the value is not a matter)
stage name : consumer_stage
type : INTERNAL
Last updated