Understanding relationship types in Cortex
A relationship type captures the semantics of a connection between entities: its directionality, the roles each side plays, and the constraints on what can appear at either end. Rather than treating all relationships as equivalent links, Cortex distinguishes between a few fundamentally different relationship patterns:- Entity relationships - Customizable relationships (hierarchical or cyclical) between any entity types
- Team hierarchies - Hierarchical relationships specifically between teams, including ownership over other entities. Learn more in Understanding hierarchies.
- Domain hierarchies - Hierarchical relationships between domains, with optional inheritance so ownership can flow down from parent to child. Learn more in Viewing the domain hierarchy.
- Dependencies - Cyclical relationships between non-team entities. Learn more in Defining dependencies.
Relationship direction: Source vs. destination
Every relationship has a direction. The source is the parent (the upstream entity), and the destination is the child (the downstream entity). For example, in a Repository relationship, aService (source/parent) contains a Repository (destination/child).
This direction determines how the relationship is drawn in an entity’s relationships graph, so define it carefully when creating a relationship type. If upstream and downstream appear reversed, the source and destination entities were likely defined in the opposite order.
Custom relationship type use cases
Viewing relationship types
Viewing all configured relationship types
- From the main sidebar, expand Catalogs, then select All entities.
- Select the Relationship types tab.
.png?fit=max&auto=format&n=fKqTUx7McPYDap8G&q=85&s=5af78499c846a6298f623be909cbf9aa)
- Select a relationship type from the list to view more information.
Viewing relationships on entity pages
If an entity belongs to a relationship, you can explore that context directly from its details page.- Navigate to the entity’s details page.
- From the left entity details sidebar, select Relationships. Relationship types associated with the entity appear in the relationships graph.
California belongs to a relationship called Geography . Relationships default to graph view, giving you a visual map of parent/child connections, where sources (parents/upstream) connect to their destinations (children/downstream).



Entity relationship CQL
You can create Scorecard rules and write CQL queries based on entity relationships. See more examples in the CQL Explorer in Cortex.Entity relationship destinations
Entity relationship destinations
All recursive destinations an entity for a relationship type, with an optional depth parameter to expand resultsDefinition -
entity.destinations(relationshipType = "my-relationship")ExamplesYou could write a Scorecard rule to ensure that an entity has at least one destination with the “my-relationship” type:Entity relationship sources
Entity relationship sources
All recursive sources an entity for a relationship type, with an optional depth parameter to expand resultsDefinition -
entity.sources(relationshipType = "my-relationship")ExamplesYou could write a Scorecard rule that ensures an entity has at least one source with the “my-relationship” type: