Skip to content

Snowflake UbiOps

Download link for necessary files: Snowflake files.

In this example we will show you the following: How to create a deployment that makes connection with the snowflake environment and retrieves data on request. The user will be able to send a request with the amount of money he has and the deployment will check our (fake) shop to see what he can afford.

Snowflake Deployment

The deployment is configured as follows:

Deployment configuration
Name snowflake-deployment
Function A deployment that uses input from the user (price) to check in the snowflake database the items he can afford
Input field: name: max_price, data_type: Double precision
Output field: name: output, data_type: String
Version name v1
Description Snowflake deployment
Language Python 3.6

How does it work?

Step 1: Login to your UbiOps account at and create an API token with project editor rights. To do so, click on Permissions in the navigation panel, and then click on API tokens. Click on [+]Add token to create a new token.

Creating an API token

Give your new token a name, save the token in safe place and assign the following role to the token: project editor. This role can be assigned on project level.

Step 2: Download the snowflake-ubiops-example folder and open snowflake.ipynb. In the notebook you will find a space to enter your API token and the name of your project in UbiOps. Paste the saved API token in the notebook in the indicated spot and enter the name of the project in your UbiOps environment. This project name can be found in the top of your screen in the WebApp.

Step 3: Run the Jupyter notebook snowflake.ipynb and everything will be automatically deployed to your UbiOps environment! Afterwards you can explore the code in the notebook or explore the application in the WebApp.