Prerequisites
Review the Snowflake prerequisites to confirm you meet the requirements for creating an app.Instructions
-
You may wish to set up a security integration and make sure that the role you use to set up the Snowpark Container Services app has the
BIND SERVICE ENDPOINTPERMISSION. For example: -
Create a Snowflake compute pool (if not created). This is the pool of virtual machine nodes on which your service will run.
-
Check your compute pool is running:
-
Create a Snowflake stage to store your service specification files:
-
Create an image repository on your Snowflake account. This is where you push images to, and where Snowflake will pull images from:
udf(systemPrompt VARCHAR, userPrompt VARCHAR, inputValues VARIANT, metadata VARIANT)
inputValues is a JSON object containing the { columnName: columnValue } of all of your inputs selected in the component. Metadata is also a JSON object, containing any key:value pairs specified in the metadata parameters.
The UDF is invoked by the Snowpark Container Prompt component and translated into JSON, which is what your app will receive. This looks as below:
If the Output Format parameter in the Snowpark Container Prompt component is set to JSON, your service must respond with valid JSON, otherwise your output rows will all error.
Build and deploy your Docker image
In the code blocks below,
my_service is an example service name. Replace it with your own service name.-
Build and push a Docker image to the repo:
Your service will be selectable in the Snowpark Container Prompt component within the
Serviceproperty. -
Create your Snowpark Container Services service:
Your endpoint will be selectable in the Snowpark Container Prompt component within the
Endpointproperty. -
Check service details:

