Add entity relationships
Relationships are a property of the entity data model that describe a predefined relationship type between multiple entities. Relationships provide the means for entities to reference other entities to enable graph-like search capabilities.
Consider a relationship to be a directed edge pointing from
the source entity, the entity that has the relationship
component defined,
towards the target entity defined at relationship.related_entity_id
.
Relationship types
Integrations that produce entities can publish relationships directly on the entity that they publish to the environment.
Let's assume you have one entity, Entity A
, representing a vessel,
and another entity, Entity B
, representing a radar.
Given this scenario, the following is the list of relationship types you can use:
- TrackedBy:
TrackedBy
is a relationship on the vessel,Entity A
, that links to the entity that is tracking it, in this case the radar,Entity B
. - ActiveTarget:
ActiveTarget
is a relationship on the radar,Entity B
, that links to the entity it is tracking, in this case, the vessel,Entity A
.
You assign a TrackedBy
relationship type to the vessel because it is being tracked, and assign
an ActiveTarget
relationship type to the radar because it is tracking the vessel.
For more information, see Relationships in the Lattice API Reference documentation.