Generic preview
This is a generic version of this article — vendor-specific item codes
(Datastream, Worldscope, FactSet, and others) are shown as
[VENDOR SPECIFIC ITEM CODE] placeholders.
Using Surge in Snowflake
Concept Overview
The simplest way to use MDO Surge is from Snowflake CoWork in Snowsight. There is nothing to install and no token to manage — if your administrator has completed the Surge setup and granted your role access, the agent is already there.
This is the right entry point when you want to find something: an item code, an index code, a custom formula, the correct function for a data type, or a worked example you can adapt.
Opening the Agent
- In Snowsight, open AI & ML → Snowflake CoWork.
- Select MDO_SURGE_AGENT from the agent dropdown.
- Ask your question in plain English.
If MDO_SURGE_AGENT does not appear in the dropdown, either the Surge
setup has not been run in your account or your Snowflake role is not in
the list of roles granted access. Ask your ACCOUNTADMIN to confirm
both.
What to Ask Surge
Surge is grounded in the MDO documentation corpus and your licensed Powerstrip catalog, so the questions it answers best are the ones that depend on knowing what MDO actually contains.
| Ask about | Example question |
|---|---|
| Item codes | What is the Worldscope item code for annual net income? |
| Index codes | What is the constituent item for the S&P 500 in Datastream? |
| Security identifiers | What is the security identifier for Toyota to use for Datastream pricing? |
| Custom formulas | What custom formulas are available for value factors in Worldscope data? |
| Function usage | Show me an example of using FundamentalData with quarterly Worldscope data. |
| Full workflows | Write mdosnow code to get S&P 500 monthly constituents for the last 3 years with closing prices and market cap in USD. |
| Code review | Validate this code and tell me whether the items and the function match. |
Two habits make a large difference to answer quality:
Name the vendor when you know it. “FactSet EPS estimate item” is a far better question than “estimates data” — the catalog contains overlapping coverage from several vendors, and naming one narrows the search immediately.
Keep index codes and data items on the same feed. If you build a universe from a QAD constituent item, ask Surge for QAD data items to populate it. Mixing feeds inside one universe produces sparse results because the security identifiers do not line up.
Running the Code Surge Writes
Snowflake CoWork returns code as text. To run it, either:
- Paste it into a Snowflake notebook in the same account, or
- Paste it into a local Python environment that has
mdosnowinstalled.
Either way you do not need to build a connection by hand. mdosnow
authenticates on import — locally it picks up the default connection
from your connections.toml, and inside a Snowflake notebook it uses
the notebook’s own session.
If your administrator enabled the optional Code Execution feature,
Surge can run generated code inside Snowflake and hand back the
resulting rows. Those tools (execute_mdo_code and check_mdo_job)
are served by a separate MCP server and are reached from an MCP client
rather than from the Snowflake CoWork UI. See Connecting Surge over
MCP.
Snowflake CoWork vs. MCP
Both paths talk to the same agent and search the same corpora. The difference is where the conversation happens and what happens next.
| Aspect | Snowflake CoWork | MCP client |
|---|---|---|
| Setup per user | None | Config file plus a Programmatic Access Token |
| Where you work | Snowsight browser tab | Your editor or terminal, alongside your code |
| Runs the code | You copy it into a notebook or a local environment | Your assistant can run it directly against Snowflake |
| Best for | Discovery, one-off lookups, ad-hoc questions | Building and iterating on real research scripts |
Most teams use both: Snowflake CoWork for quick lookups from a browser, and an MCP client for day-to-day development.