โ† Back to Catalog
๐Ÿ•ต๏ธ
MYSTERY

Ontology Detective

Datapolis P.I. โ€” design real Fabric Ontologies, write KQL queries, catch the culprit across 5 noir cases.

Difficultyโญโญโญ Advanced
Deploy Time~5 min
Complete Time~60 min
Statusโœ… Ready ยท v1.0.0
"The rain hasn't stopped in Datapolis for three days. My coffee's cold, the phone won't shut up, and another case just landed on my desk. The kind of case you don't solve with a hunch โ€” you solve it with a knowledge graph."

๐Ÿ“‹ 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:

  1. ๐Ÿ“– Read the noir briefing in the OntologyDetective_CaseFile notebook โ€” victim, time window, evidence tables, suspect list.
  2. ๐Ÿ›๏ธ Open DetectiveOntology in the Fabric Digital Twin Builder UI and add the entity types & relationships the briefing calls for (e.g. Person, Room, Visit; or Person, Alias, sameAs).
  3. ๐Ÿ” Write a KQL query against the case evidence tables in Datapolis_DetectiveEH until it returns exactly one suspect.
  4. โš–๏ธ Call detective.accuse("case-id", "Suspect Name") โ€” the judge confirms or releases them, and logs the event to the Eventhouse.
  5. ๐Ÿ“Š The OntologyDetective_Dashboard shows cases solved, wrong calls, and your detective rank.
  6. ๐Ÿ… 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:

๐Ÿ“‚ The 5 Case Files of Datapolis P.I.

Case 01 โ€” ๐Ÿง
The Stolen Pie
Entity + temporal visit (Person wasIn Room within window)
Case 02 โ€” ๐Ÿ›๏ธ
Disappearance at the Museum
Camera events (Person wasAt Location @ time)
Case 03 โ€” ๐Ÿ“ž
The Mysterious Phone Call
N-N self-relationship + temporal join (called both within 2h)
Case 04 โ€” ๐ŸŽญ
Stolen Identity
Aliases / sameAs โ€” entity resolution via alias graph
Case 05 โ€” ๐ŸŒƒ BOSS
The Final Heist
3 sub-namespaces (Bank ยท Police ยท Telecom) federated under one Person; 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

0 casesAspiring Detective
1 case๐Ÿฅ‰ Rookie
2 cases๐Ÿฅˆ Investigator
3 cases๐ŸŽฏ Inspector
4 cases๐Ÿ” Senior Detective
5 cases๐Ÿ† Commissioner of Datapolis

๐Ÿ“Š Telemetry Events โ†’ Eventhouse

Every move you make in the agency goes on record in DetectiveEvents:

DetectiveOnDuty CaseOpened AccusationMade CaseSolved WrongAccusation BadgeIssued

๐Ÿ”ง Workloads

Real-Time Intelligence Digital Twin Builder

๐ŸŽ“ What You'll Learn

SkillFabric / Modeling FeatureLevel
Model entity types & propertiesFabric Ontology + Digital Twin Builderโญ
Design relationships (1-N, N-N, self)Ontology relationsโญโญ
Temporal reasoningKQL between, datetime_diffโญโญ
Joins & multi-hop reasoningKQL join kind=innerโญโญ
Aliases & entity resolutionsameAs alias graphโญโญโญ
Multi-namespace federationBank ยท Police ยท Telecom under one Personโญโญโญ
Telemetry-driven gameplayEventhouse + 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