Examples
The public examples repository is the runnable companion to these docs:
https://github.com/metatateai/metatate-snowflake-examples
Use these docs for the canonical product behavior and interface reference. Use the examples repository when you want notebooks, sample data, expected outputs, and validation scripts you can run.
The repository uses one synthetic B2B SaaS company, AcmeCloud, so the examples build on the same governed tables, policies, and decision outcomes:
ACMECLOUD_DEMO.PUBLIC.CUSTOMERSACMECLOUD_DEMO.PUBLIC.SUBSCRIPTIONSACMECLOUD_DEMO.PUBLIC.PRODUCT_USAGE_EVENTSACMECLOUD_DEMO.PUBLIC.SUPPORT_TICKETSACMECLOUD_DEMO.PUBLIC.CUSTOMER_EXPORTS
Start HereDirect link to Start Here
| Goal | Start with |
|---|---|
| Understand the core Metatate decision flow | 01_decision_layer_cookbook.ipynb and the MCP cookbook |
| Try Metatate examples without a Snowflake account | Offline notebook mode with committed AcmeCloud response fixtures |
| Validate against the managed MCP server | Live mode with a role-restricted Snowflake PAT |
| Build a governed SQL agent | LangGraph governed SQL notebooks and runtime acceptance checks |
| Gate data, SQL, export, or AI workflow changes | CI/CD policy gate notebook and reusable CLI package |
| Check data before RAG or embedding ingestion | Governed RAG ingestion gate notebook |
| Add a Metatate guard to framework tools | OpenAI Agents SDK and LlamaIndex tool-guard examples |
| Prove Snowflake hosted agent behavior | Cortex Agent runtime notebook and live acceptance script |
| Produce human approval packets | Human-in-the-loop conditional export workflow |
Offline ModeDirect link to Offline Mode
Offline mode is the default. It uses committed AcmeCloud JSON fixtures and does not require Snowflake credentials.
git clone https://github.com/metatateai/metatate-snowflake-examples.git
cd metatate-snowflake-examples
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
scripts/run_notebook_pack.sh
Use offline mode for onboarding, review, demos, and pull requests that should not depend on a live Snowflake account.
Live MCP ModeDirect link to Live MCP Mode
Live mode runs the same examples through the Snowflake-managed Metatate MCP server.
Use live mode when you want to verify the same surface used by external MCP clients:
discover-contextget-decision-contextinspect-data-meaninginspect-governance-rulesauthorize-usevalidate-query-contextexplain-why
Live mode requires a Metatate Snowflake Native App install, the managed MCP server, a least-privilege Snowflake role, and a role-restricted PAT for that role. Follow the repository's live mode guide before creating or sharing PATs.
Cookbook Or ExamplesDirect link to Cookbook Or Examples
Start with the MCP cookbook when you want to understand the core sequence of Metatate tools:
- discover governed context
- inspect meaning and rules
- authorize a proposed use
- validate SQL before execution
- explain the decision for audit
Open the examples repository when you want to run that flow yourself, inspect the AcmeCloud sample inputs and outputs, or validate it against a live Metatate MCP server. The first runnable version of the cookbook flow is 01_decision_layer_cookbook.ipynb.
Repository MapDirect link to Repository Map
| Path | Purpose |
|---|---|
notebooks/ | Notebook-first walkthroughs |
sample-data/acmecloud/ | Synthetic AcmeCloud tables, policies, and response fixtures |
sample-outputs/ | Curated expected output summaries |
common/ | Shared Python client helpers |
cicd_policy_gate/ | Reusable CI/CD policy gate example |
human_exception_workflow/ | Human approval and exception workflow example |
framework_runtime/ | LangGraph, OpenAI Agents SDK, and LlamaIndex runtime acceptance checks |
cortex_agent_runtime/ | Live Snowflake Cortex Agent acceptance helpers |
sql/ | AcmeCloud setup, smoke test, and cleanup SQL |
ValidationDirect link to Validation
The examples repository separates readable examples from runtime proof:
- Offline CI executes the notebooks and reusable local workflows with committed fixtures.
- Live MCP validation executes the core examples against the Snowflake-managed Metatate MCP server.
- Framework acceptance checks prove the tool guard or governed-agent pattern is invoked by the target framework.
- Cortex Agent runtime validation is live-only because it creates Snowflake Cortex Agent objects.
Review the repository's validation matrix before treating a framework example as production-ready.