A field-service data agent over a Snowflake gold layer the model cannot see past
For building-services data we engineered a conformed Snowflake gold layer with identity resolved at build time and a row access policy on every table, then a data agent — LangGraph and Snowflake Cortex, later Foundry — that answers across CRM, finance and device telemetry.
Context
Building-services customers wanted self-service answers over service, financial and telemetry data spanning field-service CRM, ERP finance, a customer portal database and building-automation devices — with strict per-customer isolation.
Challenge
Three identity spaces, bridge tables that were easy to mis-join, and a hard requirement that no prompt could widen a customer's scope.
What we built
We built the gold star of dynamic tables with canonical customer IDs resolved at build time and a row access policy on every table; generated Cortex semantic views; and shipped dual engines — Cortex Agent and a custom LangGraph pipeline (classify → scope → plan → build → six pre-execution checks → execute) with per-user scope stamping. A Foundry port reaches Snowflake through an RLS-safe MCP server we own, using a signed identity ticket per call. Chat history and feedback in Cosmos DB with re-entitlement checks on resume.
- Mis-join costs we measured (1,250 vs 658 work orders; 17,820 vs 594 invoices) became permanent guardrails
- The Ontology Accelerator's building-services pack recompiled a 156-line, 8-table semantic view to 43 lines over 2 tables with no crosswalks
Outcome
Dev and QA container apps run against the real warehouse; the Foundry fast lane answered three benchmark questions in 21/26/21 seconds versus 42/39/24 for the LangGraph Cortex lane with identical numbers. Migration from legacy views to gold is under way with parity gates before every customer-facing claim.
Pick one system, one team, two weeks.
We forward-deploy an engineer with the right accelerator, your team signs every gate, and the method stays with you when we leave.