Create an ontology with Fabric IQ
In this lab, you’ll create a complete Fabric IQ ontology for a fictitious healthcare company by manually building each component—entity types, properties, keys, relationships, and data bindings. The sample data represents hospitals, departments, rooms, patients, vital sign equipment, and vital signs readings.
[!IMPORTANT] Ontology in Microsoft Fabric is currently in preview.
This lab takes approximately 40 minutes to complete.
Note: You need access to a Fabric paid or trial capacity and permission to create items in a workspace to complete this exercise. For information about the free Fabric trial, see Fabric trial. Ask your Fabric administrator to enable the required tenant settings: Users can create ontology (preview) items and Users can create Fabric items. This exercise uses the new ontology experience. It doesn’t require you to materialize a graph.
Create a workspace
- Navigate to the Microsoft Fabric home page at
https://app.fabric.microsoft.com/home?experience=fabricin a browser, and sign in with your Fabric credentials. - In the menu bar on the left, select Workspaces (the icon looks similar to 🗇).
- Create a new workspace with a name of your choice. Under Advanced, select Fabric and a capacity you can use, or select Fabric Trial if a trial capacity is available. Select Apply.
- When your new workspace opens, it should be empty.
Create a lakehouse with sample data
Now you’ll create a lakehouse and load hospital operations data that will form the basis of your ontology.
- In your workspace, select + New item > Lakehouse.
- Name the lakehouse
LamnaHealthcareLH, leave Lakehouse schemas selected, and select Create. - When the lakehouse opens, you’ll upload CSV files and convert them to tables.
Download and load the hospital data files
You’ll download sample data files, upload them to the lakehouse, and convert them to tables.
- Download sample-data.zip and extract the CSV files to your local computer. The ZIP file contains:
- Hospitals.csv - Healthcare facilities in your network
- Departments.csv - Hospital departments (ICU, Emergency, Surgical)
- Rooms.csv - Individual rooms within departments
- Patients.csv - Current patients and their room assignments
- VitalSignEquipment.csv - Monitoring equipment assigned to patients (which patient is being monitored, and when monitoring started)
- VitalSignsReadings.csv - Actual patient vital sign measurements (heart rate, oxygen levels) collected over time from the monitors
- Upload the five lakehouse files:
- In the lakehouse, select Get data > Upload files.
- Browse to and select these five files: Hospitals.csv, Departments.csv, Rooms.csv, Patients.csv, VitalSignEquipment.csv
- Select Open.
- Select Upload to upload all five files at once.
- Wait until each file shows that the upload is complete, then close the upload dialog.
Note: You’ll upload VitalSignsReadings.csv to an eventhouse later, not to the lakehouse.
- Convert each uploaded file to a table:
- In Explorer, select the Files folder, where you should see all five CSV files
- For each file, select the ellipsis (…) to the right of the file name
- Select Load to Tables > New table
- Configure the table:
- New table name: Use the file name without extension in lowercase (for example,
hospitals,departments,rooms,patients,vitalsignequipment) - Column header: Check Use header for column names
- Separator: Leave as comma (
,)
- New table name: Use the file name without extension in lowercase (for example,
- Select Load and wait for the success notification before you load the next file. Load to Tables is unavailable while another load is running.
- Repeat this process for all five files.
-
Expand Tables > dbo and verify you have five tables:
hospitals,departments,rooms,patients, andvitalsignequipment, as shown in the image below.
Create an eventhouse with streaming data
Next, you’ll create an eventhouse to store timestamped vital signs data that you’ll bind to the ontology later. You ingest a fixed sample file in this exercise, not a live stream.
Note: To return to your workspace from an open item, select the workspace in the left navigation, then select its name in the object explorer. Dismiss any first-use welcome dialogs or tours to access the item controls.
- In your workspace, select + New item > Eventhouse.
- Name the eventhouse
LamnaHealthcareEHand select Create. - A default KQL database is created with the same name. Select the KQL database to open it.
Ingest vital signs data
- In the KQL database, select Get data > Local file.
- In the Select or create a destination table section, select New table, enter
VitalSignsReadings, and select the check mark to submit the name. - Under Add up to 1,000 files, select Browse for files and upload the VitalSignsReadings.csv file you downloaded earlier.
- Select Next. On the inspection page, verify that First row header is selected and that the preview shows six named columns, including EquipmentId and Timestamp.
- Select Finish. Wait for the summary to show Successfully ingested, then select Close.
-
Verify the VitalSignsReadings table appears in the KQL database and that the ingestion summary reports 20 rows.
Your KQL database should now show the VitalSignsReadings table:

Create an ontology
Now you’ll create an empty ontology and build it step by step.
- In your workspace, select + New item > Ontology (preview).
- Name the ontology
LamnaHealthcareOntologyand select Create. - The ontology canvas opens, empty and ready for you to build your data model.
Create entity types
You’ll create five entity types representing the healthcare domain. Follow the detailed steps for the first entity type to learn the process, then use the reference table to create the remaining four.
Create Hospital entity type
- In the ontology ribbon, select Add entity type.
- Enter Hospital as the entity type name and select Add Entity Type.
- The Hospital entity type appears on the canvas.
- With the Hospital entity type selected, select View entity type details in the ribbon to open the entity type’s Configure page.
- In the Properties section, expand Manage property bindings and select Add properties.
-
Enter the first property name and data type below. Select + Add to add a row for each remaining property:
Property Name Property Type HospitalId Integer HospitalName String City String State String -
After adding all properties, select Save.
-
Now you need to define an entity key. An entity key is a property that uniquely identifies each instance of the entity type. For hospitals, each hospital has a unique HospitalId, so this will be the key.
Select Define entity type key and choose HospitalId as the key, select Save.
- Select Home to return to the ontology canvas.
Create remaining entity types
Follow the same process to create these four additional entity types with their properties and keys:
| Entity Type | Property Name | Property Type | Entity Type Key |
|---|---|---|---|
| Department | DepartmentIdDepartmentNameHospitalIdFloor |
Integer String Integer Integer |
DepartmentId |
| Room | RoomIdRoomNumberDepartmentIdRoomType |
Integer String Integer String |
RoomId |
| Patient | PatientIdFirstNameLastNameDateOfBirthAdmissionDateCurrentRoomId |
Integer String String DateTime DateTime Integer |
PatientId |
| VitalSignEquipment | EquipmentIdPatientIdRoomIdEquipmentTypeMonitoringStartDate |
String Integer Integer String DateTime |
EquipmentId |
You now have five entity types with properties and keys defined. Verify that the Entity Types pane shows all five entity types, and that properties and entity type key have been defined for each entity:

Create relationship types
Now, you’ll create relationship types that model the healthcare entity relationships and vital sign monitoring: Hospital → Department → Room → Patient, with VitalSignEquipment monitoring Patient and located in Room. Follow the detailed steps for the first relationship, then use the reference table to create the remaining four.
Create Hospital-Department relationship
- In the ribbon, select Add relationship.
- In the Add new relationship dialog, configure:
- Relationship type name:
contains - Origin entity type:
Hospital - Target entity type:
Department
- Relationship type name:
-
Select Create.

The Contains relationship line appears on the canvas connecting Hospital to Department. You’ll configure the data source later.
Create remaining relationships
Follow the same process to create these four additional relationships:
| Relationship Name | Origin Entity Type | Target Entity Type | Meaning |
|---|---|---|---|
| has | Department | Room | Departments have rooms |
| assignedTo | Patient | Room | Patients are assigned to rooms |
| monitors | VitalSignEquipment | Patient | Vital sign equipment monitors patients |
| locatedIn | VitalSignEquipment | Room | Vital sign equipment is located in rooms |
Your ontology canvas should look similar to the image below. Depending on canvas layout and which entities are selected, you may need to pan or zoom to view all entity types and relationship lines.

Your ontology structure is complete. Now you need to bind entity properties to actual data sources.
Bind entity types to data
So far, you’ve defined the schema of your ontology—entity types with properties and keys—but these are just empty templates. To make the ontology functional, you must bind each entity type to actual data sources. This tells Fabric where to find the real healthcare data that will populate your ontology.
You’ll bind static data from lakehouse tables to four entities, then add both static and time-series bindings to the VitalSignEquipment entity.
Bind Hospital entity
- Select Hospital in Explorer, then select View Entity Type details.
- On the Configure page, select Manage property bindings > Add binding and properties.
- On the Property binding page, select Add next to Sources to open the OneLake catalog.
- Find LamnaHealthcareLH in your workspace. Expand the lakehouse, expand dbo, select hospitals, and select Select table.
-
Select Entity type properties and wait for the source columns to populate. Verify these mappings to the existing properties:
Property Source column Property type HospitalId hospitals.HospitalId Integer HospitalName hospitals.HospitalName String City hospitals.City String State hospitals.State String If a mapping isn’t populated, select the existing property name and its matching source column. Don’t create duplicate properties or add an empty property row.
- Select Create, wait for Entity type updated successfully, then select Cancel to close the binding page. On Configure, verify that the properties show their source columns rather than Unbound.
- Select Home to return to the ontology canvas.
Bind Department, Room, and Patient entities
Follow the same binding process for these three entities, which only require static data bindings. Select each table under LamnaHealthcareLH > dbo. Verify that each property maps to the source column of the same name and retains the data type you defined earlier.
| Entity Type | Table Name | Source Columns |
|---|---|---|
| Department | departments | DepartmentIdDepartmentNameHospitalIdFloor |
| Room | rooms | RoomIdRoomNumberDepartmentIdRoomType |
| Patient | patients | PatientIdFirstNameLastNameDateOfBirthAdmissionDateCurrentRoomId |
Bind VitalSignEquipment entity
The VitalSignEquipment entity uses two data sources: a primary source for static equipment attributes and a secondary source for time-series measurements. Bind the static source first, then link the readings by EquipmentId:
VitalSignEquipment.csv (Lakehouse - Static attributes):
EquipmentId | PatientId | RoomId | EquipmentType | MonitoringStartDate
VS-1001 | 1001 | 1 | Continuous Monitoring | 2026-02-01
VS-1002 | 1002 | 2 | Continuous Monitoring | 2026-02-01
VitalSignsReadings.csv (Eventhouse - Time-series measurements):
ReadingId | EquipmentId | Timestamp | HeartRate | OxygenSaturation | RespiratoryRate
1 | VS-1001 | 2026-02-02T08:00:00Z | 78 | 98 | 16
2 | VS-1001 | 2026-02-02T08:05:00Z | 82 | 97 | 18
4 | VS-1002 | 2026-02-02T08:00:00Z | 92 | 99 | 14
Notice the time-series data only has measurements and EquipmentId—not patient or equipment type. The static binding creates the equipment entities with full context (VS-1001 is Continuous Monitoring equipment tracking Patient 1001), and the time-series binding attaches streaming measurements to those entities using EquipmentId as the matching key.
Bind static monitor reference data
- Select VitalSignEquipment in Explorer, then select View Entity Type details.
- Select Manage property bindings > Add binding and properties, then select Add next to Sources.
- Expand LamnaHealthcareLH > dbo, select vitalsignequipment, and select Select table.
- Select Entity type properties, wait for the columns to populate, and verify the mappings:
- EquipmentId → EquipmentId
- PatientId → PatientId
- EquipmentType → EquipmentType
- MonitoringStartDate → MonitoringStartDate
- RoomId → RoomId
- Select Create, wait for Entity type updated successfully, and select Cancel to return to Configure.
Bind time-series vital signs data
Now you’ll add the timestamped readings as time-series properties.
- On the VitalSignEquipment Configure page, select Manage property bindings > Add binding and properties.
- Select Add next to Sources. In the OneLake catalog, expand LamnaHealthcareEH, expand its LamnaHealthcareEH KQL database, select VitalSignsReadings, and select Select table. Use the keyword filter if needed to find the eventhouse.
- Under Relationship with primary data source, select EquipmentId in both the vitalsignequipment column and VitalSignsReadings column lists. Select Save.
- Select Entity type properties. Keep the five existing static properties bound to vitalsignequipment, including the EquipmentId key.
-
Verify the new properties and their time-series configuration:
Property Source column Property type Timestamp column ReadingId VitalSignsReadings.ReadingId Timeseries<String> Timestamp HeartRate VitalSignsReadings.HeartRate Timeseries<Integer> Timestamp OxygenSaturation VitalSignsReadings.OxygenSaturation Timeseries<Integer> Timestamp RespiratoryRate VitalSignsReadings.RespiratoryRate Timeseries<Integer> Timestamp Keep the inferred String value type for ReadingId. Timestamp orders each time-series property rather than becoming a separate static property. If duplicate key columns are proposed, keep the original EquipmentId property bound to the primary source instead of adding another equipment key.
Your time-series binding configuration should look like this:

- Select Save, wait for Entity type updated successfully, and select Cancel. On Configure, verify that the new properties show Timeseries and the VitalSignsReadings source.
- Select Home to return to the ontology canvas.
Your VitalSignEquipment entity now has both static reference data (which monitors are where) and time-series data (sample vital sign readings over time).
All five entity types now have data bindings connecting their properties to data sources.
Configure relationships
Now you’ll configure each relationship type by matching properties in the two bound entity types. The sample tables already contain the properties needed for these joins, so you don’t need a separate mapping table.
Configure Hospital-Department relationship
- In Explorer, under Relationship Types, select contains to open its configuration page.
- Leave Use mapping table? set to Off.
- Under Origin entity type, confirm Hospital is selected and set Property 1 to HospitalId.
-
Under Target entity type, confirm Department is selected and set Property 1 to HospitalId.
These selections match
Hospital.HospitalIdtoDepartment.HospitalId. Don’t match HospitalId to DepartmentId: the department’s HospitalId identifies its parent hospital.Your contains configuration should look like this:

- Select Save and wait for Successfully updated the relationship type.
- Select Home to return to the ontology canvas.
Configure remaining relationships
Follow the same process for the remaining four relationships. Select each relationship under Relationship Types, leave Use mapping table? set to Off, select the properties below, and select Save. Wait for the success message before you return Home.
| Relationship | Origin entity property | Target entity property |
|---|---|---|
| has (Department → Room) | Department.DepartmentId | Room.DepartmentId |
| assignedTo (Patient → Room) | Patient.CurrentRoomId | Room.RoomId |
| monitors (VitalSignEquipment → Patient) | VitalSignEquipment.PatientId | Patient.PatientId |
| locatedIn (VitalSignEquipment → Room) | VitalSignEquipment.RoomId | Room.RoomId |
The equipment-to-room relationship uses the equipment table’s RoomId directly. PatientId identifies a patient, not a piece of equipment, and isn’t the equipment entity key.
Preview the ontology
Your ontology now has entities, relationships, static data, and time-series properties.
- Select Room under Entity Types, then select View Entity Type details.
- Select the Instances tab and wait for the data to load. Verify that the table contains 10 rooms.
-
Find ICU-302. Verify that its RoomId is 2, DepartmentId is 1, and RoomType is Critical Care.

- Return Home and use the same process to inspect the other entity types. The sample contains one hospital, three departments, five patients, and five pieces of vital sign equipment.
- Open VitalSignEquipment > Configure. Verify that EquipmentId remains the entity key, RoomId is bound to vitalsignequipment.RoomId, and ReadingId, HeartRate, OxygenSaturation, and RespiratoryRate show Timeseries bindings to VitalSignsReadings. The Instances table displays the static equipment properties, not the time-series readings.
- Return Home and verify that all five relationship types are listed. Reopen each relationship to check the saved property pairs against the preceding table.
You’ve manually defined a healthcare ontology and connected its business concepts to sample operational data. The new experience uses Configure and Instances rather than the old Entity type overview tiles. Exploring a materialized graph or creating an AI agent is outside this exercise. For an optional next step, see Materialize a graph from an ontology.
Clean up resources (optional)
You can keep this workspace and ontology to continue exploring Fabric IQ capabilities. If you want to remove the resources you created in this exercise, follow these steps:
- In the bar on the left, select your workspace, then select its name in the object explorer to open the workspace page.
- Select Workspace settings.
- In the General section, verify that Name identifies the workspace you created for this exercise. Don’t remove a shared workspace.
- Select Remove this workspace, then select Delete in the Delete workspace? dialog. This removes the lakehouse, eventhouse, ontology, and any items created automatically for the ontology.