Snowflake Cortex AI Chat with File > Introduction to Snowflake Cortex AI Chat with File recipe > Prerequisites
  

Prerequisites

To use the Snowflake Cortex AI Chat with File recipe, the following prerequisites must be met:
You must create a stage in the Snowflake Web UI with the Snowflake server-side encryption enabled and upload your files to the stage.
To create a stage in Snowflake Web UI, use the following snippet in the Snowflake worksheet:
CREATE STAGE <stage_name> DIRECTORY = ( ENABLE = true ) ENCRYPTION = ( TYPE = 'SNOWFLAKE_SSE' );
To upload a file to the Snowflake stage, you can perform one of the following steps:
The file appears in the Stage Files tab of the Snowflake stage.
After uploading the file, you must get the stage path to invoke the process.
To get the stage path, perform the following steps:
  1. 1In the Snowflake Web UI, go to Data > Databases and select the database.
  2. 2In the Schemas tab, select the schema.
  3. 3In the Stages tab, select the stage where you have uploaded the file.
  4. 4Click the Actions menu corresponding to the file and click Copy path as shown in the following sample image:
This image shows the stage files and an option to copy the file path.
In this image, DEMO is the database, LOCATION is the schema, and INPUT_STAGE is the stage.
When you copy the path as shown in the above sample image, you will get the path as '@"DEMO"."LOCATION"."INPUT_STAGE"/collation.pdf', where stage path is @DEMO.LOCATION.input_stage and the file name is collation.pdf. You'll need these values while invoking the process.