โ† Back to Catalog
๐Ÿ™๏ธ
MISSION

City Builder

Become the Mayor of Datapolis โ€” design Warehouse star schemas and a Power BI semantic model, one district at a time!

Difficulty โญโญโญ Advanced
Deploy Time ~5 min
Complete Time ~90 min
Status โœ… Ready ยท v1.0.0

๐Ÿ“‹ Overview

Welcome, Mayor of Datapolis! Your city is growing fast and the Council needs answers. Build a real Fabric Warehouse and a Power BI semantic model to serve the citizens, district by district.

Each district teaches a core dimensional modeling concept โ€” surrogate keys, conformed dimensions, semi-additive facts, SCD Type 2 โ€” and ends with a boss-level galaxy schema uniting all 3 main facts of your city.

๐Ÿš€ Quick Start

# In any Fabric notebook
%pip install -q fabric-arcade

from fabric_arcade import arcade
arcade.install("city-builder", workspace="My Workspace")
# Provisions: Datapolis_LH, Datapolis_DW, Datapolis_EH (KQL),
# CityBuilder_Seed, CityBuilder_Mayor, CityBuilder_Dashboard notebooks.

Then run CityBuilder_Seed once (loads 8 raw datasets into Datapolis_LH), create an empty Power BI semantic model named Datapolis_Model bound to Datapolis_DW, open CityBuilder_Mayor, set PLAYER_NAME in Stepย 0, then for each district write the T-SQL + DAX and run mayor.validate("<district-id>"). Finish with mayor.score() and mint your signed badge.

๐Ÿงฉ How You Play (Real Fabric, Not a Simulation)

City Builder is a learning quest: you model real Fabric Warehouse tables and a Power BI semantic model. Every district follows the same loop:

  1. ๐Ÿ“– Read the briefing in the CityBuilder_Mayor notebook (e.g. "Datapolis launched a taxi service โ€” build FactTaxiTrip + DimDate, DimDriver, DimZone, DimVehicle").
  2. ๐Ÿ’ผ Open the empty Warehouse Datapolis_DW in Fabric and write T-SQL to CREATE the tables and load them from the raw data in Datapolis_LH.
  3. ๐Ÿ”— Open the Semantic Model Datapolis_Model in Fabric, add the required relationships, and author the DAX measures listed in the briefing.
  4. โš–๏ธ Back in the notebook, run mayor.inspect_district("taxi") โ€” the Mayor validates your schema via INFORMATION_SCHEMA, runs your DAX measures via the XMLA endpoint, and compares to the expected oracle. Telemetry goes to the Eventhouse.
  5. ๐Ÿ“Š The CityBuilder_Dashboard updates live with the city map, your Mayor reputation, and the DAX scoreboard.

๐Ÿ“ฆ What Gets Installed in Your Workspace

arcade.install("city-builder") deploys:

๐Ÿ—บ๏ธ The 8 Districts of Datapolis

Each district teaches one star-schema concept. Districts 3, 4 and 5 must be done before the boss.

๐Ÿ›๏ธ
District 1
Town Hall
Phantom Census โ€” facts vs dimensions, grain & surrogate keys
๐ŸŒ†
District 2
Neon District
Shifting Identities โ€” SCD Typeย 1 overwrite merge
๐Ÿš
District 3
Skylane
Anti-Grav Couriers โ€” additive fact + conformed DimDate/DimSector
โšก
District 4
Plasma Core
Reactor Readings โ€” semi-additive fact (snapshot metrics)
๐Ÿ›๏ธ
District 5
Bazaar 9
Quantum Market โ€” role-playing DimDate (Order vs Delivery)
๐Ÿฅ
District 6
Cryo Hospital
Admission Tags โ€” junk & degenerate dimensions
๐ŸŽญ
District 7
Holo-Stage
Multiverse Performers โ€” many-to-many bridge table
๐ŸŒƒ
District 8 โ€” BOSS
Grid Overlook
Galaxy schema โ€” 3 facts, shared dims, Grid Stress Index DAX

๐Ÿค– What the Mayor (Judge) Checks

๐Ÿ“Š Telemetry Events โ†’ Eventhouse

Every Mayor's inspection generates real-time events for analytics:

MayorElected DistrictAttempt DistrictBuilt DistrictRejected CityCertified

๐Ÿ”ง Workloads

Data Warehouse Power BI Real-Time Intelligence

๐Ÿ… Mayor Ranks

Each validated district awards reputation; the Mayor's title scales with the cumulative score (max 900).

Min ReputationRank
0Suspicious Citizen
100๐Ÿฅ‰ Ward Councilor
250๐Ÿฅˆ Urban Planning Officer
500๐Ÿฅ‡ Mayor of Datapolis
800๐Ÿ—๏ธ Chief Grid Architect
900๐Ÿ† Grid Keeper

๐ŸŽ“ What You'll Learn

SkillFabric / Modeling FeatureLevel
Identify facts vs dimensionsDimensional modelingโญ
Surrogate keysT-SQL IDENTITYโญ
Conformed dimensionsStar schema basicsโญโญ
Semi-additive factsSnapshot patternsโญโญ
Role-playing dimensionsDAX USERELATIONSHIPโญโญ
Junk + degenerate dimsKimball patternsโญโญโญ
SCD Type 1 & Type 2Slowly Changing Dimensionsโญโญโญ
Galaxy schemaMulti-fact conformed modelingโญโญโญ
DAX measures via XMLASemantic model authoringโญโญโญ

๐ŸŽฎ 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