Graph Databases

Detect repeated source-qualified keys

The same name belongs to two plants

Two plants both use P7, and the east plant has renamed its pump. Botie must recognise the repeated east identity without merging the west pump.

BOTIE

There is one east/P7 row and one west/P7 row. Both display Main pump. Does this batch contain a repeated qualified identity?
The inputs we are comparing

Imported identity records

A rename repeats one scoped identity

[
  {
    "system": "east",
    "external_id": "P7",
    "name": "Main pump"
  },
  {
    "system": "west",
    "external_id": "P7",
    "name": "Main pump"
  },
  {
    "system": "east",
    "external_id": "P7",
    "name": "Renamed pump"
  }
]

Identical names belong to different plants

[
  {
    "system": "east",
    "external_id": "P7",
    "name": "Main pump"
  },
  {
    "system": "west",
    "external_id": "P7",
    "name": "Main pump"
  }
]
Result for a rename repeats one scoped identity
  1. 0["east","P7"]

For a list use brackets, such as [2, 4]. For a matrix put each row in brackets. Text answers can stay as text.

Two source systems both resend a renamed asset

This check uses the pieces from “Report repeated qualified keys”.

BOTIE

The north:plant system resends local key A, and the north system resends local key plant:A. Each pair has changed its display name. Predict the repeated structured IDs without merging the two identities at the colon.
Imported identity records
[
  {
    "system": "north:plant",
    "external_id": "A",
    "name": "Feed pump"
  },
  {
    "system": "north",
    "external_id": "plant:A",
    "name": "Feed pump"
  },
  {
    "system": "north:plant",
    "external_id": "A",
    "name": "Pump by the door"
  },
  {
    "system": "north",
    "external_id": "plant:A",
    "name": "Transfer pump"
  },
  {
    "system": "south",
    "external_id": "A",
    "name": "Feed pump"
  }
]

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 is joining the two fields with an unescaped colon weaker than encoding a structured pair?

Identity needs a documented namespace and representation that survives ordinary data changes.

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 courseWho Inspected This Pump? →
← Which Equipment Depends on This Supply?