-
Locate the sf-hcls-solutions repository:
- Check
~/project/sf-hcls-solutions/
- Check current working directory
- If not found:
git clone https://github.com/Snowflake-Labs/sf-hcls-solutions.git /tmp/sf-hcls-solutions
-
Read solutions/medical-device-streaming/manifest.json.
-
Present the installation plan:
Solution: Medical Device Streaming Platform v1.0.0
Industry: Healthcare & Life Sciences
Database: SF_SOLUTIONS
Schemas: MEDICAL_DEVICE_CLINICAL, MEDICAL_DEVICE_TELEMETRY
Role: ACCOUNTADMIN
What will be created:
- 2 schemas (clinical + telemetry)
- 5 tables (PATIENT_SESSIONS, DEVICE_REGISTRY, ECG_DATA, EDA_DATA, PPG_DATA, DEVICE_TELEMETRY)
- 4 streaming pipes (ECG, EDA, PPG, TELEMETRY)
- 5 analytics views (3 flattened + PATIENT_VITAL_SIGNS consolidated + DEVICE_TELEMETRY_FLATTENED)
- Grants for streaming and query access
Optional:
- Synthetic Healthcare Data (free Marketplace dataset for patient demographics)
Proceed with installation?
-
Wait for user confirmation.
-
Read solutions/medical-device-streaming/scripts/setup.sql and execute it.
Execution strategy:
- Execute statement by statement (all are independent DDL/DML)
- Log progress after each major section (schemas, tables, pipes, views, grants)
-
Load sample data using parallel subagents for speed:
Important: This is static demo data for initial visualization. For real-time
streaming that updates continuously, users must run the Python streaming client
(see NEXT_ACTIONS.md "Run the Streaming Demo" section).
All INSERT blocks in data.sql are independent. Spawn 4 subagents in parallel
(max 4 to avoid overloading local resources):
| Subagent | Schema | Tables |
|---|
| 1 | MEDICAL_DEVICE_CLINICAL | PATIENT_SESSIONS + DEVICE_REGISTRY |
| 2 | MEDICAL_DEVICE_CLINICAL | ECG_DATA |
| 3 | MEDICAL_DEVICE_CLINICAL | EDA_DATA + PPG_DATA |
| 4 | MEDICAL_DEVICE_TELEMETRY | DEVICE_TELEMETRY |
Each subagent must start with:
USE ROLE ACCOUNTADMIN;
USE DATABASE SF_SOLUTIONS;
USE WAREHOUSE SF_SOLUTIONS_WH;
USE SCHEMA SF_SOLUTIONS.<schema>;
Then execute its assigned INSERT statement(s) from data.sql.
Wait for all 4 subagents to complete before proceeding to step 7.
-
Verify installation:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM SF_SOLUTIONS.INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA IN ('MEDICAL_DEVICE_CLINICAL', 'MEDICAL_DEVICE_TELEMETRY')
ORDER BY TABLE_SCHEMA, TABLE_NAME;
SHOW PIPES IN SCHEMA SF_SOLUTIONS.MEDICAL_DEVICE_CLINICAL;
SHOW PIPES IN SCHEMA SF_SOLUTIONS.MEDICAL_DEVICE_TELEMETRY;
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
FROM SF_SOLUTIONS.INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA IN ('MEDICAL_DEVICE_CLINICAL', 'MEDICAL_DEVICE_TELEMETRY')
AND TABLE_TYPE = 'VIEW'
ORDER BY TABLE_SCHEMA, TABLE_NAME;
-
Deploy Streamlit app (CRITICAL — app won't exist without this):
First, locate the streamlit files in the repository:
solutions/medical-device-streaming/streamlit/streamlit_app.py
solutions/medical-device-streaming/streamlit/environment.yml
Step 8a — Set context and create stage:
USE ROLE ACCOUNTADMIN;
USE DATABASE SF_SOLUTIONS;
USE WAREHOUSE SF_SOLUTIONS_WH;
USE SCHEMA MEDICAL_DEVICE_CLINICAL;
CREATE STAGE IF NOT EXISTS SF_SOLUTIONS.MEDICAL_DEVICE_CLINICAL.STREAMLIT_STAGE DIRECTORY = (ENABLE = TRUE);
Step 8b — Upload files to stage via PUT:
PUT file://<repo_path>/solutions/medical-device-streaming/streamlit/streamlit_app.py @SF_SOLUTIONS.MEDICAL_DEVICE_CLINICAL.STREAMLIT_STAGE/ AUTO_COMPRESS=FALSE OVERWRITE=TRUE;
PUT file://<repo_path>/solutions/medical-device-streaming/streamlit/environment.yml @SF_SOLUTIONS.MEDICAL_DEVICE_CLINICAL.STREAMLIT_STAGE/ AUTO_COMPRESS=FALSE OVERWRITE=TRUE;
Replace <repo_path> with the actual absolute path to the repository on disk.
-
[MANDATORY — DO NOT SKIP] Retrieve and display the Streamlit app URL.
Execute this query:
SELECT 'https://app.snowflake.com/'
|| LOWER(CURRENT_ORGANIZATION_NAME()) || '/' || LOWER(CURRENT_ACCOUNT_NAME())
|| '/#/streamlit-apps/SF_SOLUTIONS.MEDICAL_DEVICE_CLINICAL.MEDICAL_DEVICE_MONITOR' AS STREAMLIT_URL;
You MUST display the result to the user in this exact format:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Streamlit Dashboard:
<paste the STREAMLIT_URL query result here>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This step is NON-OPTIONAL. If you skip this, the installation is INCOMPLETE.
The user MUST see the Streamlit URL. Do NOT substitute with a Snowsight schema browser URL.
-
Show final summary (MUST include the Streamlit URL from step 9):