Snowflake Task Manager using Streamlit

Blog: Snowflake Task Manager using Streamlit | by Sudhendu | Nov, 2022 | Medium

Github: GitHub - SudhenduP/snowflake-task-manager-unofficial

One of the constant holdbacks to using the Snowflake Task feature is the manageability and maintainability aspect.

Creating a task is not so hard (we :heart: Snowflake). It is usually the maintenance, monitoring, etc that is a bit difficult.

Few nice to have features for Snowflake Task would be:

  1. A single view of all the tasks for an account.
  2. Task-specific dashboard showing upcoming tasks, recently failed tasks, etc.
  3. Account-wide centralized dashboard and statistics of tasks.

The Streamlit App flow

On a high level, below is the flow of the code.

  1. Create a Snowflake connection (how).
  2. Execute Snowflake SQL Statements.
  3. Cleanse the response and store it in a data frame in CSV (this is done to avoid calling Snowflake every time someone interacts with the application, saving credits).
  4. Read the CSVs and then use various Streamlit features to display stats, tables, take actions, etc.
  5. Anytime you want to get the latest data from Snowflake, you can use the button ‘Refresh Data’ to get the latest snapshot from Snowflake.

Snowflake Task Manager with Streamlit: Features

Once connected to your Snowflake environment, the Streamlit application can:

:snowflake: View Task Statistics.

:snowflake: See Task List.

:snowflake: See Execution History.

:snowflake: Execute a Task Ad hoc.