| name | supply-chain-intelligence |
| description | Install or teardown the Supply Chain Intelligence Platform solution. Usage: $sf-mleu-solutions:supply-chain-intelligence | $sf-mleu-solutions:supply-chain-intelligence teardown Triggers: supply chain, inventory, manufacturing, cortex agent, intelligence, orders, shipments.
|
| tools | ["snowflake_sql_execute","snowflake_object_search","Bash","Read","Glob","Grep","WebFetch"] |
Supply Chain Intelligence Platform
Parse the action from $ARGUMENTS:
- If
$ARGUMENTS is "install" or empty → run Install flow
- If
$ARGUMENTS is "teardown" → run Teardown flow
- Otherwise → show usage help
Overview
- Industry: Manufacturing
- Database: SF_SOLUTIONS
- Schema: SUPPLY_CHAIN_ENTITIES
- Features: Snowflake Intelligence, Cortex Analyst, Cortex Search, Semantic Model, Streamlit in Snowflake
- Role Required: ACCOUNTADMIN
Install
-
Locate the sf-mleu-solutions repository:
- Check current working directory
- If not found:
git clone https://github.com/Snowflake-Labs/sf-mleu-solutions.git /tmp/sf-mleu-solutions
-
Read solutions/supply-chain-intelligence/manifest.json.
-
Query the current account info and present the installation plan together:
SELECT CURRENT_ORGANIZATION_NAME() AS ORG, CURRENT_ACCOUNT_NAME() AS ACCOUNT, CURRENT_REGION() AS REGION, CURRENT_ROLE() AS ROLE;
Show to the user:
Solution: Supply Chain Intelligence Platform v1.0.0
Industry: Manufacturing
Database: SF_SOLUTIONS
Schema: SUPPLY_CHAIN_ENTITIES
Role: ACCOUNTADMIN
Target Account:
Organization: <ORG>
Account: <ACCOUNT>
Region: <REGION>
Current Role: <ROLE>
What will be created:
- 11 tables with demo data (~1,100 rows across suppliers, plants, customers, orders, inventory)
- Semantic Model (staged YAML for Cortex Analyst)
- Cortex Search Service (supply chain documentation)
- Snowflake Intelligence Agent (SUPPLY_CHAIN_ASSISTANT)
- Streamlit app (optional)
Proceed with installation?
-
Wait for user confirmation.
-
Read solutions/supply-chain-intelligence/scripts/setup.sql and execute in BATCHES to minimize round-trips.
Group independent statements together with semicolons in a single snowflake_sql_execute call:
Batch 1 — Setup (DDL infrastructure):
USE ROLE ACCOUNTADMIN;
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"supply_chain_intelligence_platform","version":{"major":1,"minor":0},"attributes":{"is_quickstart":1,"source":"sql"}}';
CREATE DATABASE IF NOT EXISTS SF_SOLUTIONS;
CREATE SCHEMA IF NOT EXISTS SF_SOLUTIONS.SUPPLY_CHAIN_ENTITIES;
CREATE WAREHOUSE IF NOT EXISTS SF_SOLUTIONS_WH WAREHOUSE_SIZE='LARGE' AUTO_SUSPEND=60 AUTO_RESUME=TRUE;
USE WAREHOUSE SF_SOLUTIONS_WH;
USE DATABASE SF_SOLUTIONS;
USE SCHEMA SUPPLY_CHAIN_ENTITIES;
CREATE STAGE IF NOT EXISTS SEMANTIC_STAGE ENCRYPTION=(TYPE='SNOWFLAKE_SSE') DIRECTORY=(ENABLE=TRUE);
CREATE STAGE IF NOT EXISTS SCN_PDF ENCRYPTION=(TYPE='SNOWFLAKE_SSE') DIRECTORY=(ENABLE=TRUE);
CREATE STAGE IF NOT EXISTS STREAMLIT_STAGE DIRECTORY=(ENABLE=) COMMENT;
FILE FORMAT IF CSVFORMAT SKIP_HEADER FIELD_OPTIONALLY_ENCLOSED_BY TYPE;
-
[MANDATORY — DO NOT SKIP] Retrieve and display the agent URL and Streamlit URL.
Execute this query:
SELECT
'https://app.snowflake.com/' || LOWER(CURRENT_ORGANIZATION_NAME()) || '/' || LOWER(CURRENT_ACCOUNT_NAME())
|| '/#/agents/database/SF_SOLUTIONS/schema/SUPPLY_CHAIN_ENTITIES/agent/SUPPLY_CHAIN_ASSISTANT/details' AS AGENT_URL,
'https://app.snowflake.com/' || LOWER(CURRENT_ORGANIZATION_NAME()) || '/' || LOWER(CURRENT_ACCOUNT_NAME())
|| '/#/streamlit-apps/SF_SOLUTIONS.SUPPLY_CHAIN_ENTITIES.SUPPLY_CHAIN_APP' AS STREAMLIT_URL;
Display to the user:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Supply Chain Assistant:
<AGENT_URL>
Streamlit App (optional):
<STREAMLIT_URL>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This step is NON-OPTIONAL. The user must always see clickable URLs after install.
-
Show final summary:
Installation complete: Supply Chain Intelligence Platform v1.0.0
Next Actions:
1. Open Snowsight > AI & ML > Agents > SUPPLY_CHAIN_ASSISTANT
2. Try: "Which manufacturing plants have low inventory for which raw materials?"
3. Try: "How many orders did we receive in the last month?"
Teardown: $sf-mleu-solutions:supply-chain-intelligence teardown
Teardown
If $ARGUMENTS is "teardown":
- Confirm with user: "This will drop SUPPLY_CHAIN_ENTITIES schema (all tables, agent, search service). Proceed?"
- Read and execute
solutions/supply-chain-intelligence/scripts/teardown.sql statement by statement.
- Confirm: "Supply Chain Intelligence Platform removed."
Next Actions
If the user asks "what next?", "what can I do?", or "how to customize":
Read and present the content from NEXT_ACTIONS.md (located in this skill's directory).
Present the relevant section based on user intent:
- Just exploring → Quick Exploration section
- Wants to use own data → Customize with Your Data section
- Ready for production → Production Deployment section
Usage Help
Usage:
$sf-mleu-solutions:supply-chain-intelligence — Install the solution
$sf-mleu-solutions:supply-chain-intelligence teardown — Remove the solution