What is Snowflake Cortex Code?
Snowflake Cortex Code (also known as CoCo) is Snowflake's AI agent for working with your data platform. You give it natural-language instructions and it plans and executes the work against your Snowflake environment—writing and optimizing SQL, building and debugging pipelines and notebooks, and orchestrating multi-step tasks—while operating within your account's existing role-based access control and governance.
It is generally available in Snowsight for all accounts: open a workspace under Projects » Workspaces and select the Cortex Code icon to start a session. Snowflake also ships Cortex Code as a standalone desktop IDE and as a command-line interface that runs in a local shell, so the same agent is available wherever you work.
FactorPrism complements Cortex Code as the callable "why" tool. Cortex Code is a general-purpose agent; explaining a metric movement is a specialized multi-step computation it can simply delegate: the agent issues one CALL to FactorPrism's headless procedure and reads back a reconciled, ranked attribution it can reason over and act on.
The missing primitive for agentic analytics
Snowflake Cortex Code and Cortex Agents generate and run SQL against the account brilliantly. The one thing general-purpose agents are documented to struggle with is the multi-step "why" — decomposing a movement across region × product × channel at once, without double-counting, and reconciling exactly to the reported number.
That is precisely what FactorPrism does — and now it's a callable tool. One CALL returns a reconciled, ranked attribution with each cause located at the level of the business where it acts. FactorPrism complements Snowflake's AI-SQL surfaces; it doesn't compete with them. It's the finished, reconciled "why" primitive an agent can reach for.
One call, from anywhere in Snowflake
From Cortex Code, a Snowflake task, a Cortex Agent, or an alerting pipeline — the same callable procedure, server-side, in the customer's account:
CALL FACTORPRISM.API.RUN_DECOMPOSITION(
source_ref => 'SOURCE_VIEW',
date_field => 'ORDER_DATE',
metric_field => 'REVENUE',
use_row_count => FALSE,
rollup => 'WEEK',
hierarchies => PARSE_JSON('[["REGION","DIVISION","STATE"],["CATEGORY","PRODUCT"],["CHANNEL"]]'),
period_start => '2025-01-06',
period_end => '2025-06-30',
baseline_period => NULL
);It returns the ranked driver/contribution table (the same data the app shows) and persists every run for fetching via SELECT. A detector flags a spike; the agent decomposes it automatically and routes "which segment owns the movement" to whoever needs it. Full API reference →
Built 100% on Snowflake
No external services. The entire integration is a read-only grant, and every analysis is compute and AI on data already in the customer's account.
| Snowflake capability | How FactorPrism® uses it |
|---|---|
| Native App Framework | The full analysis engine installs into the customer's account; versioned releases pass Snowflake's automated security review. |
| Snowflake Marketplace | One-click install, 30-day free trial, billing through the existing Snowflake relationship. |
| Snowflake Cortex | AI-written, plain-language explanation of every factor. |
| Virtual warehouse compute | Server-side aggregation and in-account analysis — consumption stays in the customer's account. |
| Permission SDK (references) | Read-only grants on just the tables or views the customer chooses. |
| Agentic SQL (Cortex Code / Cortex Agents / tasks) | A callable API.RUN_DECOMPOSITION procedure an agent, task, or pipeline invokes and reads back via SELECT. |
Why it's better together
Net-new consumption
Every analysis — manual, scheduled, or agent-driven — is virtual warehouse compute and Snowflake Cortex usage on data already in the account. Automating the "why" compounds consumption with each run.
Zero data movement
The app runs in-account under the customer's existing governance and security posture. Nothing is extracted; the integration is a single read-only grant.
Extends the analytics story
It carries Snowflake's analytics from "what moved" to the reconciled "why" — and fills the multi-step-reasoning gap for the agentic stack as a tool agents can call.
Automation- and audit-grade
Results reconcile exactly to the change and are bit-identical run-to-run — the stability automation and finance require, and what separates a real primitive from a best-effort chat answer.
Proof, not adjectives
- It reconciles exactly. Ranked factors sum to the change to the unit — no residual, no balancing plug.
- Measured against ground truth. A published blind benchmark: across 280 runs it recovered 100% of injected causes in its operating regime, returning a tight ~4-6 factor list where magnitude-only approaches flood. See the benchmark →
- Live on Snowflake Marketplace. Install, run the built-in demo with no data connection, then connect a table.
- Real pull. Our first trial customer asked us to expose the analysis as a callable procedure so they could wire it into their alerts pipeline as an automated second-stage explainer — exactly the agent-callable pattern Snowflake is featuring.
Drive it from your agent — get the skill
We publish a ready-made Agent Skill that teaches your agent when and how to call FactorPrism — the parameters, the bind → run → fetch recipe, and how to read the reconciled result. It's a single SKILL.md in the standard Agent Skills format, so it works in both Snowflake Cortex Code and Claude Code.
Download the FactorPrism agent skill (.zip)
Unzip it into your agent's skills directory (.claude/skills/ for Claude Code; your Cortex Code skills directory), then just ask your agent "why did this metric move?" against a Snowflake account with FactorPrism installed — it binds the source, runs the decomposition, and summarizes the drivers. Full call reference: Headless API Reference.
See it running on Snowflake
FactorPrism is live on Snowflake Marketplace — install it, run the built-in demo with no data connection, then point it at your own table.
Get FactorPrism on Marketplace