Ontology Detective
Datapolis P.I. โ design real Fabric Ontologies, write KQL queries, catch the culprit across 5 noir cases.
๐ Overview
You are Detective Sherlock Graph at Datapolis P.I., the city's last honest investigation agency. Five cases. Five mysteries. Each one is solved by designing the right ontology in the Fabric Digital Twin Builder UI, then writing a KQL query against the case evidence that converges on a single suspect.
The ontology is your thinking tool. The KQL is your weapon. The judge โ detective.accuse(case_id, name) โ
doesn't care how pretty your model is, only that you can name the culprit.
๐ Quick Start
# 1. Install (deploys an Eventhouse, an Ontology item, and 3 notebooks)
from fabric_arcade import arcade
arcade.install("ontology-detective")
# 2. Run OntologyDetective_Seed (one-time, loads all 5 case datasets)
# 3. Open OntologyDetective_CaseFile and play
๐งฉ How You Play (Real Fabric, Not a Simulation)
Each case follows the same investigative loop:
- ๐ Read the noir briefing in the
OntologyDetective_CaseFilenotebook โ victim, time window, evidence tables, suspect list. - ๐๏ธ Open DetectiveOntology in the Fabric Digital Twin Builder UI and add the entity types & relationships the briefing calls for (e.g.
Person,Room,Visit; orPerson,Alias,sameAs). - ๐ Write a KQL query against the case evidence tables in
Datapolis_DetectiveEHuntil it returns exactly one suspect. - โ๏ธ Call
detective.accuse("case-id", "Suspect Name")โ the judge confirms or releases them, and logs the event to the Eventhouse. - ๐ The
OntologyDetective_Dashboardshows cases solved, wrong calls, and your detective rank. - ๐
Solve all 5 cases, set your
PLAYER_NAME, and run the badge cell to mint your Commissioner of Datapolis badge โ shareable on LinkedIn.
๐ฆ What Gets Installed in Your Workspace
arcade.install("ontology-detective") deploys:
- โก 1 Eventhouse
Datapolis_DetectiveEHโ holds theDetectiveEventstelemetry table plus the 8 evidence tables (one per case data source). - ๐ 1 Ontology
DetectiveOntologyโ pre-created empty. You design the entities and relationships in Digital Twin Builder as each case demands. - ๐ 3 Notebooks:
OntologyDetective_Seedโ applies the KQL schema and bulk-loads all 5 case datasets (run once).OntologyDetective_CaseFileโ 5 noir briefings +detectiveobject (briefing, accuse, scoreboard) + badge cell.OntologyDetective_Dashboardโ leaderboard, recent events, accuracy.
๐ The 5 Case Files of Datapolis P.I.
Person wasIn Room within window)Person wasAt Location @ time)sameAs โ entity resolution via alias graphPerson; intersection across all three๐ Example: Case 1 KQL
The briefing tells you Mrs. Plum's pie went missing from the kitchen between 14:00 and 14:30. Three neighbours visited. Find the one who was in the kitchen during the window.
Case1_Visits
| where RoomName == "Kitchen"
| where EnteredAt < datetime(2026-06-05 14:30:00)
and LeftAt > datetime(2026-06-05 14:00:00)
| where PersonName != "Mrs. Plum"
| project PersonName
One row comes back. Pass that name to detective.accuse("stolen-pie", "...") and you're a Rookie.
๐ Detective Ranks
๐ Telemetry Events โ Eventhouse
Every move you make in the agency goes on record in DetectiveEvents:
๐ง Workloads
๐ What You'll Learn
| Skill | Fabric / Modeling Feature | Level |
|---|---|---|
| Model entity types & properties | Fabric Ontology + Digital Twin Builder | โญ |
| Design relationships (1-N, N-N, self) | Ontology relations | โญโญ |
| Temporal reasoning | KQL between, datetime_diff | โญโญ |
| Joins & multi-hop reasoning | KQL join kind=inner | โญโญ |
| Aliases & entity resolution | sameAs alias graph | โญโญโญ |
| Multi-namespace federation | Bank ยท Police ยท Telecom under one Person | โญโญโญ |
| Telemetry-driven gameplay | Eventhouse + KQL Dashboard | โญโญ |
๐ฎ Played it? Tell me!
Tried this game in your Fabric workspace? Share how it went, leave a comment, or report a ๐ bug โ your feedback shapes the next level.
Made with ๐ฎ by the Fabric Community
Not affiliated with Microsoft