B2B Marketing Intelligence — Context Engineering on Databricks

From Fragmented Marketing Data
to Governed Intelligence

AON's Marketing Data Lake surfaces a structural problem: five source systems, no agreed metric definitions, and a marketing-sales attribution war that produces different numbers every quarter. Context Engineering on Databricks solves it — once.

Eloqua · Aon Connect · Cvent · ON24 · Unity CDP Unity Catalog · Metric Views · Genie One marketing_sourced_pipeline · mql_volume · post_event_pipeline_90d
The Problem

Three definition gaps that block every marketing KPI

AON's MDL working document records these gaps explicitly — they are confirmed issues in the data, not hypothetical risks. Context Engineering closes them by encoding agreed definitions once, in Unity Catalog, where every downstream tool reads the same answer.

⚔️

The Attribution War

marketing_sourced_pipeline has no agreed rule. Marketing filters C_Lead_Source___Original1 from Eloqua. Sales pulls lead_source from Aon Connect. Different fields. Different filters. Different numbers — every board meeting.

CONFIRMED GAP · MDL WORKING DOC ROW 10
🔎

The MQL Mirage

There is no is_mql flag in the MDL schema. MQL must be derived from lead_status_code and lead_stage. Every analyst re-derives it differently. Campaign conversion rates are incomparable across teams.

CONFIRMED GAP · MDL WORKING DOC ROW 16
🔗

The Invisible Event

Cvent event data flows into MDL via an Eloqua CDO. The five-hop join to pipeline opportunities exists but is undocumented. No attribution window is defined. The event team cannot answer: "Did our London Forum generate pipeline?"

CONFIRMED GAP · MDL WORKING DOC ROW 19
The Solution

Context Engineering is a methodology, not a layer

CE is the practice of encoding business intent — what a metric means, what qualifies, what's excluded — directly into the data platform, as three permanent artifacts. Every downstream consumer reads the same definition. The attribution war ends because there is only one place the rule lives.

ARTIFACT 01

UC Column COMMENT

An ALTER COLUMN … COMMENT on lead_attributes_it.lead_source encodes the agreed allowlist and prohibits ad-hoc filters. Genie reads this before generating any SQL.

ARTIFACT 02

Unity Catalog Metric View

A YAML definition in Unity Catalog with a measures block. The expr contains the exact SQL. synonyms ensure "marketing pipeline" and "sourced pipeline" resolve to the same governed measure.

ARTIFACT 03

Genie Knowledge Store

A serialized_space that tells Genie: MQL is defined by status code, not a flag. Marketing-sourced requires the allowlist. Event attribution uses the 90-day window. Trusted SQL assets are pre-verified.

One source, two outputs: The same Metric View definition that governs Genie conversations also feeds Power BI Copilot via the Databricks Semantic Bridge. The attribution rule is written once and versioned in Unity Catalog. There is no separate BI semantic model to maintain.

Ask the question. Get the governed answer.

Select a persona to see how Context Engineering on Databricks resolves each definition gap.

Without Context Engineering
Dialogue with Data — Genie + CE
⚙️
Semantic Context — How Genie knows this answer
▼
UC COMMENT
METRIC VIEW
KNOWLEDGE STORE
LINEAGE
MDL Query Result
marketing.mdl — Unity Catalog

AON MDL — Context Engineering Data Flow

SOURCE SYSTEMS Eloqua Oracle Marketing Cloud Email · Web · Lead Score Aon Connect Oracle Sales Cloud Leads · Opps · Contacts Cvent Event Management via Eloqua CDO ON24 Virtual Events / Webinars via Eloqua CDO Unity CDP Customer 360 Identity Resolution DATABRICKS MARKETING DATA LAKE Bronze Raw ingestion ELQ_Contacts · leads Silver Cleansed · joined lead_attributes_it Gold cmpgn · opty · events campaign_member_it Reltio MDM Identity resolution vw_org_crosswalk CONTEXT ENGINEERING UC Column COMMENTs ALTER COLUMN lead_source COMMENT 'allowlist: ...' + lead_status_code rule + campaign_cvent_id chain Metric Views (YAML) marketing_sourced_pipeline mql_volume post_event_pipeline_90d measures · synonyms · joins Genie Knowledge Store serialized_space Trusted SQL assets NL→SQL instructions MCP endpoint CONSUMPTION Genie One Conversational Analytics Metric View → governed SQL NL queries use synonyms + allowlist + window Trusted SQL assets /ai-gateway/genie_one_mcp Power BI Copilot Governed BI dashboards via Semantic Bridge Same UC Metric View No duplicate definition in BI semantic layer SQL Analysts MEASURE() function Same logic, reusable Full UC lineage Unity Catalog — Single governance layer · Full lineage · Access controls
CE Artifacts

The three permanent artifacts that end the attribution war

Written once. Version-controlled in Unity Catalog. Read by every downstream tool — Genie, Power BI Copilot, SQL notebooks. Changing the definition means editing one expr.

📝

Unity Catalog Column COMMENT

Encodes the marketing-sourced allowlist at the field level

-- Encode the attribution rule where the data lives
ALTER TABLE marketing.mdl.lead_attributes_it
ALTER COLUMN lead_source COMMENT
  'Lead origin as recorded in Aon Connect (Oracle Sales Cloud).

MARKETING-SOURCED ALLOWLIST (agreed Oct 2026):
  Event, Content Syndication, Paid Social,
  Webinar, Email Campaign, Referral

DO NOT filter on Eloqua C_Lead_Source___Original1
without cross-referencing this field — the two
systems stamp different values. Use the Metric View
marketing_sourced_pipeline for governed reports.

Owner: Marketing Ops · Reviewed: 2026-10-15';
📐

Marketing Pipeline Metric View

Governed marketing_sourced_pipeline and mql_volume measures

# marketing.mdl.mv_marketing_pipeline
version: 1.1
source: marketing.mdl.lead_attributes_it
comment: "MDL Marketing Pipeline — governed layer"
filter: lead_status_code != 'DELETED'

joins:
  - name: opty
    source: marketing.mdl.opportunity_attributes_iit
    on: source.lead_id = opty.opty_lead_id

measures:
  - name: Marketing Sourced Pipeline
    expr: SUM(CASE WHEN lead_source IN (
        'Event','Content Syndication',
        'Paid Social','Webinar',
        'Email Campaign')
      THEN opty.opty_amount_usd END)
    synonyms: ["marketing pipeline",
               "sourced pipeline"]

  - name: MQL Volume
    expr: COUNT(CASE WHEN
        lead_status_code = 'QUALIFIED'
        AND lead_stage = 'MQL'
      THEN lead_id END)
        # note: lead_comverted_date (one 'n')
    synonyms: ["qualified leads","MQLs"]
📅

Event Attribution Metric View

Governs the Cvent → pipeline 90-day attribution window

# marketing.mdl.mv_event_attribution
version: 1.1
source: marketing.mdl.opportunity_attributes_iit

joins:
  - name: contact
    source: marketing.mdl.contact_it
    on: source.opty_primary_contact_id
       = contact.con_party_id
  - name: event
    source: marketing.mdl.cmpgn_campaigns_it
    on: contact.campaign_cvent_id
       = event.campaign_cvent_id

measures:
  - name: Post-Event Pipeline 90d
    expr: SUM(CASE WHEN
        DATEDIFF(opty_record_creation_date,
                 event.event_start_date)
        BETWEEN 0 AND 90
      THEN opty_amount_usd END)
    comment: "90d window — CMO sign-off to change"
    synonyms: ["event pipeline",
               "conference pipeline",
               "post-event attribution"]
🧠

Genie Knowledge Store

serialized_space — AON-specific business rules for Genie

/* Genie Space: AON Marketing Intelligence
   Space: aon-marketing-mdl-prod              */

-- MQL DEFINITION
INSTRUCTION:
  "MQL = lead_status_code='QUALIFIED'
   AND lead_stage='MQL'.
   NO standalone mql_flag in MDL.
   Conversion field: lead_comverted_date
   (note: one 'n' — actual schema spelling)."

-- ATTRIBUTION RULE
INSTRUCTION:
  "Always use Metric View for marketing
   pipeline — never raw lead_source filter.
   Eloqua and Aon Connect stamp different
   lead_source values."

-- TRUSTED ASSET: Pipeline QTD
TRUSTED_ASSET marketing_pipeline_qtd:
  SELECT lead_source,
    COUNT(lead_id)       AS lead_count,
    SUM(opty_amount_usd) AS pipeline_usd
  FROM MEASURE(marketing_sourced_pipeline)
  WHERE opty_record_creation_date
    >= DATE_TRUNC('quarter',CURRENT_DATE())
  GROUP BY 1 ORDER BY 3 DESC;
⌨
Test Environment Setup
Code examples are hidden · click to expand — configure a Databricks environment to run these demos live
▼

Sprint-aligned to AON MDL. Three phases.

Phase 1 · Sprints 8–10

Define & Encode

  • Workshop attribution allowlist with Marketing Ops + Sales
  • Write UC COMMENTs on lead_source, lead_status_code
  • Create marketing_sourced_pipeline Metric View
  • Create mql_volume Metric View (canonical derivation)
  • Validate against existing Aon Connect reports
Phase 2 · Sprints 11–13

Extend & Verify

  • Build event attribution Metric View (90-day window)
  • Configure Genie Space with MDL knowledge store
  • Add Trusted SQL assets for 5 executive questions
  • Connect Power BI via Semantic Bridge to UC Metric Views
  • UAT with Campaign Manager and Event Lead personas
Phase 3 · Sprints 14–16

Govern & Expand

  • Promote Metric Views to production Unity Catalog
  • Configure Genie One MCP endpoint
  • Stage 2: MROI, full-path attribution (Reltio required)
  • CDP multi-contact attribution (identity resolution)
  • Executive dashboard on governed definitions