Visual Diagram
End-to-End Request Lifecycle
The flowchart illustrates how SQL queries interact with the SimpleScore UDFs and container service. Each component lives inside your Snowflake account, ensuring governance policies and audit controls remain intact.
flowchart LR
subgraph Customer_Snowflake_Account
subgraph App_Schema
Q["SQL Query (JOIN claims + members)"]
UDF["Call SCORE.RISK(version, person, diagnoses, format)"]
Result["VARIANT Result (scores, CCs, HCCs…)"]
end
subgraph Container_Service["CORE.SCORE_SERVICE (Snowflake Container)"]
Endpoint["HTTPS /calculate"]
ScoringEngine["SimpleScore HCC Engine"]
end
Log["SCORE.SCORE_LOG + SCORE.USAGE (optional)"]
Config["SCORE.PREFS (endpoints, telemetry settings)"]
end
Q --> UDF
UDF --> Endpoint
Endpoint --> ScoringEngine
ScoringEngine --> Endpoint
Endpoint --> Result
Result --> Q
UDF -.-> Log
Config -.-> UDF
style Q fill:#f0f6ff,stroke:#2563eb
style UDF fill:#dbeafe,stroke:#2563eb
style Result fill:#ecfdf5,stroke:#0f766e
style Endpoint fill:#fff4e6,stroke:#d97706
style ScoringEngine fill:#ffe7cc,stroke:#d97706
style Log fill:#f1f5f9,stroke:#475569,stroke-dasharray: 5 3
style Config fill:#f8fafc,stroke:#64748b,stroke-dasharray: 5 3
style Container_Service fill:#fff7ed,stroke:#f59e0b
style Customer_Snowflake_Account stroke:#0f172a,stroke-width:2
classDef dashed stroke-dasharray: 5 3;
class Log dashed;
class Config dashed;
Optional Logging Controls
Toggle telemetry granularity by editing SCORE.PREFS. Capture request IDs, version usage, and latency metrics when you need deeper observability.
Multi-Version Flexibility
Invoke legacy (V22) or current (V24/V28) models by switching the `version` argument—no deployment change required.
Container Autosuspend
Snowflake suspends the container 10 minutes after the final request, eliminating idle infrastructure costs.