Customer experience analytics is crucial for businesses to understand their customers and improve their services. Through comprehensive data analysis and AI-powered insights, businesses can uncover patterns in customer feedback, identify pain points, and generate actionable recommendations.

In this Quickstart, we will build a comprehensive fan experience analytics platform for a basketball team called "Snow Bear". This demonstrates how to use Snowflake Cortex AI functions to analyze fan survey data, extract sentiment insights, generate business recommendations, and create advanced analytics dashboards.

This Quickstart showcases the complete Snow Bear analytics platform with:

What You Will Build

What You Will Learn

Prerequisites

In this step, you'll create the Snowflake database objects and upload all necessary files for the Snow Bear analytics platform.

Step 1: Create Database Objects

  1. In Snowsight, click Worksheets in the left navigation
  2. Click + in the top-right corner to open a new Worksheet
  3. Copy the setup script from setup.sql and paste it into your worksheet, then run it

The setup script creates:

Step 2: Download Required Files

Download these 3 files from the GitHub repository:

File

Purpose

Download Link

Data File

Basketball fan survey data

basketball_fan_survey_data.csv.gz

Streamlit App

Interactive analytics dashboard

snow_bear.py

Semantic Model

AI assistant semantic model

snow_bear_fan_360.yaml

Step 3: Upload Files to Stages

  1. In Snowsight, change your role to SNOW_BEAR_DATA_SCIENTIST
  2. Navigate to CatalogDatabase ExplorerSNOW_BEAR_DBANALYTICSStages

Upload data and app files:

  1. Click on SNOW_BEAR_DATA_STAGE
  2. Click Enable Directory Table
  3. Upload basketball_fan_survey_data.csv.gz and snow_bear.py to this stage

Upload semantic model:

  1. Go back and click on SEMANTIC_MODELS stage
  2. Click Enable Directory Table
  3. Upload snow_bear_fan_360.yaml to this stage

Step 4: Import the Analytics Notebook

  1. Download the notebook: snow_bear_complete_setup.ipynb
  2. Import into Snowflake:
    • Navigate to ProjectsNotebooks in Snowsight
    • Click the down arrow next to + Notebook and select Import .ipynb file
    • Choose snow_bear_complete_setup.ipynb from your downloads
  3. Configure the notebook settings:
    • Role: Select SNOW_BEAR_DATA_SCIENTIST
    • Database: Select SNOW_BEAR_DB
    • Schema: Select ANALYTICS
    • Query Warehouse: Select SNOW_BEAR_WH
    • Notebook Warehouse: Select SNOW_BEAR_WH
  4. Click Create to import the notebook

The notebook contains all the SQL scripts and processing logic needed for the complete analytics platform.

Execute the Complete Analytics Workflow

  1. Go to ProjectsNotebooks in Snowsight
  2. Click on SNOW_BEAR_COMPLETE_SETUP Notebook to open it
  3. Click Run all to execute all cells in the notebook at once

Access Your Analytics Platform

  1. Navigate to ProjectsStreamlit in Snowsight
  2. Find and click on Snow Bear Fan Analytics
  3. Explore your 7-module analytics dashboard

Your platform includes executive dashboards, sentiment analysis, theme analysis, fan segmentation, AI recommendations, interactive search, and AI assistant capabilities.

Remove All Created Objects

When you're ready to remove all the resources created during this quickstart:

  1. Open the setup.sql script
  2. Scroll to the bottom to find the "TEARDOWN SCRIPT" section
  3. Uncomment the teardown statements
  4. Run the freshly uncommented script to remove all databases, warehouses, roles, and objects

Congratulations! You've successfully built the complete Snow Bear Fan Experience Analytics platform using Snowflake Cortex AI!

What You Learned

Resources