본문으로 건너뛰기
Workshop overview
Chapter 5 of 7
20 min

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.

CategoryQuestion it answersEntities in this scenario
ObjectWhat is failing?iot_machine, iot_sensor
EventWhat happened?iot_maintenance_event
AgentWho responds?iot_technician
LocationWhere did it happen?iot_location
TimeWhen 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.

EntityRowsCategoryMeaning
iot_machine9ObjectCNC machines
iot_sensor27Objectmachine and sensor-type pairs
iot_maintenance_event6Eventmaintenance events created from anomalies
iot_technician6Agentmaintenance technicians
iot_location4Locationline and zone pairs
iot_shift2Timeday and night shifts
RelationRowsConnects
iot_reads_from27sensor → machine
iot_triggers6machine → maintenance event
iot_located_at9machine → location
iot_performs6technician → maintenance event
iot_occurs_during6maintenance event → shift
iot_assigned_to6technician → 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

MachineLocationTechnicianTeamShift
CNC-03LOC-A2 Zone-2Park Ji-hoon (TECH-03)Precision Machining 2Day
CNC-05LOC-B1 Zone-1Choi Min-seo (TECH-04)Assembly 1Day
CNC-07LOC-B2 Zone-2Jeong Ye-eun (TECH-05)Assembly 2Day
CNC-09LOC-A2 Zone-2Park Ji-hoon (TECH-03)Precision Machining 2Day

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 --> shift

With 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.
  • ZoneTECH-03's two machines sit in the same LOC-A2, so handling them back to back needs no travel. Sequencing them is an advantage, not a cost.
  • Count versus gradeanomaly_count on iot_location reads 2 for LOC-A1 and 2 for LOC-A2. The counts match, but LOC-A1's two are CNC-01's MEDIUM and CNC-02's LOW. 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.