Graph Databases
Follow the bound inspection to its technician
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Start one binding at the requested asset and extend it through HAS_INSPECTION. Inspect origin, current and path in the resulting row.
A second pump’s technician must not enter the first pump’s result.
Inspect the component calculation
Extend each binding by one relationship(
Binding rows: Start one pattern binding(
Starting ID: Requested asset
)
Typed relationships: Choose a relationship type(
Relationships: Read graph relationships(
Graph: Asset, inspection and technician graph
)
Relationship type: HAS_INSPECTION
)
When no extension matches: required
)Examples and results
- Requested asset
P7
- Asset, inspection and technician graph
Nodes and properties (6)
- P7 · Asset
- P8 · Asset
- I1 · Inspection
- status: closed
- I2 · Inspection
- status: open
- T1 · Technician
- T2 · Technician
- P7 to I1: HAS_INSPECTION
- P8 to I2: HAS_INSPECTION
- I1 to T1: CARRIED_OUT_BY
- I2 to T2: CARRIED_OUT_BY
Inspect the node and relationship records
{ "nodes": [ { "id": "P7", "kind": "Asset" }, { "id": "P8", "kind": "Asset" }, { "id": "I1", "kind": "Inspection", "status": "closed" }, { "id": "I2", "kind": "Inspection", "status": "open" }, { "id": "T1", "kind": "Technician" }, { "id": "T2", "kind": "Technician" } ], "edges": [ { "id": "h1", "source": "P7", "target": "I1", "type": "HAS_INSPECTION" }, { "id": "h2", "source": "P8", "target": "I2", "type": "HAS_INSPECTION" }, { "id": "t1", "source": "I1", "target": "T1", "type": "CARRIED_OUT_BY" }, { "id": "t2", "source": "I2", "target": "T2", "type": "CARRIED_OUT_BY" } ] }- Required result
[ { "origin": "P7", "current": "I1", "path": [ "P7", "I1" ], "edge_ids": [ "h1" ] } ]
- Requested asset
P7
- Asset, inspection and technician graph
Nodes and properties (6)
- P7 · Asset
- P8 · Asset
- I1 · Inspection
- status: closed
- I2 · Inspection
- status: open
- T1 · Technician
- T2 · Technician
- P7 to I1: HAS_INSPECTION
- P8 to I2: HAS_INSPECTION
- I2 to T2: CARRIED_OUT_BY
Inspect the node and relationship records
{ "nodes": [ { "id": "P7", "kind": "Asset" }, { "id": "P8", "kind": "Asset" }, { "id": "I1", "kind": "Inspection", "status": "closed" }, { "id": "I2", "kind": "Inspection", "status": "open" }, { "id": "T1", "kind": "Technician" }, { "id": "T2", "kind": "Technician" } ], "edges": [ { "id": "h1", "source": "P7", "target": "I1", "type": "HAS_INSPECTION" }, { "id": "h2", "source": "P8", "target": "I2", "type": "HAS_INSPECTION" }, { "id": "t2", "source": "I2", "target": "T2", "type": "CARRIED_OUT_BY" } ] }- Required result
[ { "origin": "P7", "current": "I1", "path": [ "P7", "I1" ], "edge_ids": [ "h1" ] } ]
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
One technician completed two inspections
This check uses the pieces from “Continue from that inspection to its technician”.
BOTIE
- Asset, inspection and technician graph
Nodes and properties (10)
- R4 · Asset
- R5 · Asset
- I7 · Inspection
- I8 · Inspection
- I9 · Inspection
- I10 · Inspection
- T3 · Technician
- T4 · Technician
- T8 · Technician
- T9 · Technician
- R4 to I7: HAS_INSPECTION
- R4 to I8: HAS_INSPECTION
- R4 to I9: HAS_INSPECTION
- R5 to I10: HAS_INSPECTION
- I7 to T3: CARRIED_OUT_BY
- I8 to T3: CARRIED_OUT_BY
- I9 to T4: CARRIED_OUT_BY
- I10 to T8: CARRIED_OUT_BY
- R4 to T9: CARRIED_OUT_BY
Inspect the node and relationship records
{ "nodes": [ { "id": "R4", "kind": "Asset" }, { "id": "R5", "kind": "Asset" }, { "id": "I7", "kind": "Inspection" }, { "id": "I8", "kind": "Inspection" }, { "id": "I9", "kind": "Inspection" }, { "id": "I10", "kind": "Inspection" }, { "id": "T3", "kind": "Technician" }, { "id": "T4", "kind": "Technician" }, { "id": "T8", "kind": "Technician" }, { "id": "T9", "kind": "Technician" } ], "edges": [ { "id": "h7", "source": "R4", "target": "I7", "type": "HAS_INSPECTION" }, { "id": "h8", "source": "R4", "target": "I8", "type": "HAS_INSPECTION" }, { "id": "h9", "source": "R4", "target": "I9", "type": "HAS_INSPECTION" }, { "id": "h10", "source": "R5", "target": "I10", "type": "HAS_INSPECTION" }, { "id": "t7", "source": "I7", "target": "T3", "type": "CARRIED_OUT_BY" }, { "id": "t8", "source": "I8", "target": "T3", "type": "CARRIED_OUT_BY" }, { "id": "t9", "source": "I9", "target": "T4", "type": "CARRIED_OUT_BY" }, { "id": "t10", "source": "I10", "target": "T8", "type": "CARRIED_OUT_BY" }, { "id": "shortcut", "source": "R4", "target": "T9", "type": "CARRIED_OUT_BY" } ] }- Requested asset
R4
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Which intermediate binding would you inspect if an unrelated technician appeared?
Preserve the connecting variable instead of independently collecting each kind of node.
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher.
Work through the Python challenges →