Build a customer churn risk dashboard from scratch using Cortex Code (CoCo) and Snowflake App Runtime. No frontend experience required -- just describe what you want using an IDD-structured prompt.
- Cortex Code Desktop installed and signed in to your Snowflake account
- Snowflake CLI v3.19 or later
- Node.js 22+
- A paid Snowflake account (trial accounts do not support App Runtime)
Mount SNOWFLAKE_SAMPLE_DATA if it is not already in your account:
-- Run as ACCOUNTADMIN
CREATE DATABASE IF NOT EXISTS SNOWFLAKE_SAMPLE_DATA
FROM SHARE SFSALESSHARED.SFC_SAMPLES_AWSAPSOUTH1.SAMPLE_DATA;
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE_SAMPLE_DATA TO ROLE <your_role>;Open CoCo Desktop, type /snowflake-apps, and paste the contents of idd-churn-dashboard.md included in this gist.
CoCo will scaffold the app, wire up Snowflake data access, build, and deploy.
Once the app is live, send this follow-up message:
Add a "Download Report" button that exports the currently filtered churn data as CSV. Redeploy the app.
Check deploy status:
snow app events --last 100Check if the Application Service is running:
SHOW APPLICATION SERVICES IN SCHEMA <your_database>.<your_schema>;
DESCRIBE APPLICATION SERVICE <your_app_name>;View container logs:
snow app events --last 500Retry a failed deploy phase:
snow app deploy --upload-only # re-upload source
snow app deploy --build-only # re-trigger build
snow app deploy --deploy-only # re-create/upgrade serviceTear down and start fresh:
snow app teardown --force- First deploy takes 3-5 minutes (SPCS cold start). Subsequent deploys are faster (service upgrade).
TPCDS_SF10TCL.STORE_SALEShas 28B rows. If queries are slow, scope to a subset of years (2001-2003 have concentrated data).- The SPCS service identity has no default warehouse. Ensure your app code passes the warehouse explicitly in the Snowflake connection config.
- Snowflake App Runtime docs
- Getting started with Snowflake App Runtime
- Cortex Code Desktop
- Snowflake CLI install
- Account admin setup for App Runtime
Intent-Driven Development (IDD) -- the prompting pattern used in this demo: https://dev.to/kameshsampath/series/41588
