Graph Databases

Stage new resolvable relationships

BOTIE

Compare the incoming relationships with the stored graph. Inspect ready, repeat, conflict, dangling and invalid statuses before selecting admitted work.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

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.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Compare the incoming relationships with the stored graph. Inspect ready, repeat, conflict, dangling and invalid statuses before selecting admitted work.

Retries, changed reused IDs and missing endpoints require different outcomes.

Inspect the component calculation
Classify relationship import rows(
  Graph snapshot: Stored graph snapshot
  Incoming relationships: Incoming relationship records
)
Examples and results
Stored graph snapshot
The nodes and directed relationships in this value.Records: P7; Asset. S1; Asset. P8; Asset. Relationships: P7 to S1: DEPENDS_ON. Full records and relationships are also listed below the diagram.P7 to S1: DEPENDS_ONDEPENDS_ONDEPENDS_ONP7P7AssetAssetS1S1AssetAssetP8P8AssetAsset
Nodes and properties (3)
  • P7 · Asset
  • S1 · Asset
  • P8 · Asset
  • P7 to S1: DEPENDS_ON
Inspect the node and relationship records
{
  "nodes": [
    {
      "id": "P7",
      "kind": "Asset"
    },
    {
      "id": "S1",
      "kind": "Asset"
    },
    {
      "id": "P8",
      "kind": "Asset"
    }
  ],
  "edges": [
    {
      "id": "a",
      "source": "P7",
      "target": "S1",
      "type": "DEPENDS_ON"
    }
  ]
}
Incoming relationship records
[
  {
    "id": "a",
    "source": "P7",
    "target": "S1",
    "type": "DEPENDS_ON"
  },
  {
    "id": "new",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON"
  },
  {
    "id": "lost",
    "source": "P7",
    "target": "missing",
    "type": "DEPENDS_ON"
  },
  {
    "id": "a",
    "source": "P7",
    "target": "P8",
    "type": "DEPENDS_ON"
  }
]
Required result
[
  {
    "id": "a",
    "source": "P7",
    "target": "S1",
    "type": "DEPENDS_ON",
    "status": "repeat"
  },
  {
    "id": "new",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON",
    "status": "ready"
  },
  {
    "id": "lost",
    "source": "P7",
    "target": "missing",
    "type": "DEPENDS_ON",
    "status": "dangling"
  },
  {
    "id": "a",
    "source": "P7",
    "target": "P8",
    "type": "DEPENDS_ON",
    "status": "conflict"
  }
]
Stored graph snapshot
The nodes and directed relationships in this value.Records: P7; Asset. S1; Asset. P8; Asset. Relationships: P7 to S1: DEPENDS_ON. Full records and relationships are also listed below the diagram.P7 to S1: DEPENDS_ONDEPENDS_ONDEPENDS_ONP7P7AssetAssetS1S1AssetAssetP8P8AssetAsset
Nodes and properties (3)
  • P7 · Asset
  • S1 · Asset
  • P8 · Asset
  • P7 to S1: DEPENDS_ON
Inspect the node and relationship records
{
  "nodes": [
    {
      "id": "P7",
      "kind": "Asset"
    },
    {
      "id": "S1",
      "kind": "Asset"
    },
    {
      "id": "P8",
      "kind": "Asset"
    }
  ],
  "edges": [
    {
      "id": "a",
      "source": "P7",
      "target": "S1",
      "type": "DEPENDS_ON"
    }
  ]
}
Incoming relationship records
[
  {
    "id": "n",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON"
  },
  {
    "id": "n",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON"
  }
]
Required result
[
  {
    "id": "n",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON",
    "status": "ready"
  },
  {
    "id": "n",
    "source": "P8",
    "target": "S1",
    "type": "DEPENDS_ON",
    "status": "repeat"
  }
]
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.

A rejected row is repaired within the batch

This check uses the pieces from “Name the newly admissible relationships”.

BOTIE

The batch replays stored edge base with reordered property keys, then changes its minutes. Edge late first names a missing endpoint and then a valid one. Edge new is delivered twice unchanged. Predict the IDs staged as ready and inspect why the other rows were omitted.
Stored graph snapshot
The nodes and directed relationships in this value.Records: R9; Asset. S7; Asset. S8; Asset. Relationships: R9 to S7: ROUTE · minutes: 4. Full records and relationships are also listed below the diagram.R9 to S7: ROUTE · minutes: 4ROUTE · minutes: 4ROUTE · minutes: 4R9R9AssetAssetS7S7AssetAssetS8S8AssetAsset
Nodes and properties (3)
  • R9 · Asset
  • S7 · Asset
  • S8 · Asset
  • R9 to S7: ROUTE · minutes: 4
Inspect the node and relationship records
{
  "nodes": [
    {
      "id": "R9",
      "kind": "Asset"
    },
    {
      "id": "S7",
      "kind": "Asset"
    },
    {
      "id": "S8",
      "kind": "Asset"
    }
  ],
  "edges": [
    {
      "id": "base",
      "source": "R9",
      "target": "S7",
      "type": "ROUTE",
      "minutes": 4,
      "note": {
        "shift": "night",
        "checked": true
      }
    }
  ]
}
Incoming relationship records
[
  {
    "id": "base",
    "source": "R9",
    "target": "S7",
    "type": "ROUTE",
    "note": {
      "checked": true,
      "shift": "night"
    },
    "minutes": 4
  },
  {
    "id": "base",
    "source": "R9",
    "target": "S7",
    "type": "ROUTE",
    "minutes": 5,
    "note": {
      "shift": "night",
      "checked": true
    }
  },
  {
    "id": "late",
    "source": "R9",
    "target": "missing",
    "type": "DEPENDS_ON"
  },
  {
    "id": "late",
    "source": "R9",
    "target": "S8",
    "type": "DEPENDS_ON"
  },
  {
    "id": "new",
    "source": "S8",
    "target": "S7",
    "type": "DEPENDS_ON"
  },
  {
    "id": "new",
    "source": "S8",
    "target": "S7",
    "type": "DEPENDS_ON"
  }
]

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.

Why should a dangling rejected row not reserve an ID against a later corrected row in this staging exercise?

Define both replay identity and acceptance state before choosing a retry strategy.

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 →
Continue the courseWhy Did One More Hop Make the Query So Expensive? →