Skip to content

Snowflake-Labs/apj-build-2024-slack-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ce2ff48 · Nov 28, 2024

History

7 Commits
Nov 24, 2024
Nov 24, 2024
Nov 28, 2024
Nov 28, 2024
Nov 28, 2024
Nov 24, 2024
Nov 24, 2024
Nov 28, 2024
Nov 24, 2024
Nov 28, 2024
Nov 24, 2024
Nov 24, 2024
Nov 28, 2024
Nov 28, 2024
Nov 24, 2024
Nov 28, 2024
Nov 28, 2024

Repository files navigation

Cortex Analyst with Slack

A simple demo showcasing the integration of Snowflake Cortex Analyst with Slack. The demo also covers ChatOps aspects using the Snowflake Python API for setting up Snowflake resources such as databases, tables, stages, etc.

Prerequisites

Note

Check out direnv for a neat and clean way to manage your environment variables.

Setup

Configure all required environment variables using .env:

cp $DEMO_HOME/.env.example $DEMO/.env

Be sure to source the .env file for local use with snow. The app.py automatically loads it if it exists.

Create Python Virtual Environment

Important

All code and packages have been tested with Python 3.11

python -m venv $DEMO_HOME/.venv

Install the required packages:

pip install -r requirements.txt

Slack App Manifest

The Slack App configuration and its manifest are available in manifest.json. You can use this while setting up your Slack App. It includes all permissions, commands, and other details needed to interact with Snowflake using the bot.

Start the Bot

Note

Ensure you have installed the Slack App in your workspace using the manifest

python app.py

App Demo

Demo Video

References