Connect technician, location, and shift to the machine context
Materialize the IoT ontology and join technician, location, and shift to machine, sensor, and maintenance event so all five top categories are covered.
Question for this chapter
What machine context should accompany CNC-03's alert in the maintenance handoff?
Why this matters now
If you hand over only one alert row, the crew must rediscover which sensors belong to the machine and whether a maintenance event exists. Worse, who owns it, where to go, and when it was handled are missing entirely, so no work order can be written.
The top ontology fills those blanks with five categories.
| Category | Question it answers | Entities in this scenario |
|---|---|---|
| Object | What is failing? | iot_machine, iot_sensor |
| Event | What happened? | iot_maintenance_event |
| Agent | Who responds? | iot_technician |
| Location | Where did it happen? | iot_location |
| Time | When was it handled? | iot_shift |
Try it
Run the ontology_materialization pipeline under processed. It joins the sensor, anomaly, and health
datasets with five master tables: machines, locations, technicians, shifts, and the maintenance log.
Confirm the resulting row counts.
| Entity | Rows | Category | Meaning |
|---|---|---|---|
iot_machine | 9 | Object | CNC machines |
iot_sensor | 27 | Object | machine and sensor-type pairs |
iot_maintenance_event | 6 | Event | maintenance events created from anomalies |
iot_technician | 6 | Agent | maintenance technicians |
iot_location | 4 | Location | line and zone pairs |
iot_shift | 2 | Time | day and night shifts |
| Relation | Rows | Connects |
|---|---|---|
iot_reads_from | 27 | sensor → machine |
iot_triggers | 6 | machine → maintenance event |
iot_located_at | 9 | machine → location |
iot_performs | 6 | technician → maintenance event |
iot_occurs_during | 6 | maintenance event → shift |
iot_assigned_to | 6 | technician → shift |
Start with machine configuration
In Graph Explorer, inspect CNC-01's complete sensor configuration first.
MATCH path=(s:iot_sensor)-[:iot_reads_from]->(m:iot_machine)
WHERE m.machine_id = 'CNC-01'
RETURN path
CNC-01 connects to vibration, temperature, and pressure sensors — and so does every other machine. Because configuration is identical across all nine, the sensor relationship alone cannot set an inspection order.
Now inspect the first target, CNC-03.
MATCH path=(m:iot_machine)-[:iot_triggers]->(e:iot_maintenance_event)
WHERE m.machine_id = 'CNC-03'
RETURN path
The result should connect CNC-03 to the maintenance event created by its HIGH vibration alert.
Read who, where, and when in one pass
Collect the technician, zone, and shift for all four HIGH machines with a single query.
MATCH (m:iot_machine)-[:iot_triggers]->(e:iot_maintenance_event)
MATCH (m)-[:iot_located_at]->(l:iot_location)
MATCH (t:iot_technician)-[:iot_performs]->(e)
MATCH (e)-[:iot_occurs_during]->(s:iot_shift)
WHERE e.severity = 'HIGH'
RETURN m.machine_id, l.location_id, l.zone, t.name, t.team, s.shift_name
ORDER BY m.machine_id
What success looks like
| Machine | Location | Technician | Team | Shift |
|---|---|---|---|---|
| CNC-03 | LOC-A2 Zone-2 | Park Ji-hoon (TECH-03) | Precision Machining 2 | Day |
| CNC-05 | LOC-B1 Zone-1 | Choi Min-seo (TECH-04) | Assembly 1 | Day |
| CNC-07 | LOC-B2 Zone-2 | Jeong Ye-eun (TECH-05) | Assembly 2 | Day |
| CNC-09 | LOC-A2 Zone-2 | Park Ji-hoon (TECH-03) | Precision Machining 2 | Day |
Loading the diagram. Mermaid source:
flowchart LR
accTitle: IoT relationships across all five top ontology categories
accDescr: Sensors and machines are Objects, the maintenance event is an Event, the technician is an Agent, the line and zone are a Location, and the shift is Time, so one incident answers what, who, where, and when.
sensor["Sensor · Object"] --> machine["Machine · Object"]
machine --> event["Maintenance event · Event"]
machine --> location["Line and zone · Location"]
tech["Technician · Agent"] --> event
event --> shift["Shift · Time"]
tech --> shiftWith all five categories connected, a single incident explains what, where, to whom, and when along one path.
Interpret the result
The previous chapter set the inspection scope and a starting point. This query assigns that order to actual people.
- Technician — Park Ji-hoon (
TECH-03) owns both CNC-03 and CNC-09. Only those two form a queue. CNC-05 belongs to Choi Min-seo (TECH-04) and CNC-07 to Jeong Ye-eun (TECH-05), so neither waits. Four machines split into three lanes. - Zone —
TECH-03's two machines sit in the sameLOC-A2, so handling them back to back needs no travel. Sequencing them is an advantage, not a cost. - Count versus grade —
anomaly_countoniot_locationreads 2 forLOC-A1and 2 forLOC-A2. The counts match, butLOC-A1's two are CNC-01'sMEDIUMand CNC-02'sLOW. Counting anomalies per zone misreads risk. - Shift — All six events fall in the day shift (
SHIFT-D). The night shift (SHIFT-N) has zero anomaly responses, which is grounds for revisiting the routine right after a shift change.
Next decision
You have the source signal, statistical check, health score, and relationship context across all five categories. In the next chapter, review the four core decisions briefly. Then explain why all four machines remain in scope while CNC-03 goes first.