Configuration
Breadcrumbs

Aggregation Relationships

The Anjana Data lineage allows representing certain relationships between entities as aggregation relationships, in which one entity contains others.

By default, a relationship in the lineage is displayed as a line between the nodes representing its source and destination entities. However, if it is configured as an aggregation relationship, the visualization changes to show the destination object as contained within the source object, providing a hierarchical and simplified view.

image-20250912-132428.png
Example showing the DSA_CONTENT relationship between DSA and DATASET as an aggregation relationship


Important:

It is important to note that only relationships that have the flag isParental = true in the Object Sub-Types table can be configured as aggregation relationships. Otherwise, they will be displayed as a flat relationship.


Grouping Table in the Configuration Panel (Administrator view)

Aggregation relationship management is performed from the Configuration Panel, in the Grouping table.

image-20250912-131624.png
Grouping table for configuring aggregation relationships

Structure of the Grouping table

Each registered aggregation relationship is characterized by the following fields:

  • Id: unique identifier of the relationship acting as a grouping relationship. Assigned automatically from the Configuration Panel.

  • sourceSubtype: object subtype that acts as the container/aggregator (value of the name field in the object_subtype table) when related to the entity indicated in destinationSubtype via the relationship type indicated in relationshipSubtype.

  • destinationSubtype: object subtype that appears contained within the object of type sourceSubtype (the name field in the object_subtype table) when both are related via the relationship indicated in relationshipSubtype.

  • relationshipSubtype: relationship subtype that connects sourceSubtype with destinationSubtype and is represented in the lineage as an aggregation relationship. Corresponds to the value of the name field in the object_subtype table.


Creating an Aggregation Relationship in the Grouping table

Creating a new aggregation relationship involves creating a record in the Grouping table indicating which entity subtype will contain which, and through which relationship.

image-20250912-132641.png
Example of creating the DSA_CONTENT relationship between DSA and DATASET as an aggregation relationship

Steps from the Configuration Panel:

  1. Click the New button in the upper-right corner.

  2. Fill in the fields according to the structure:

    • sourceSubtype: select the entity subtype that will act as the container (e.g.: ENTITY - DSA).

    • destinationSubtype: select the entity subtype that will be contained (e.g.: ENTITY - DATASET).

    • relationshipSubtype: select the relationship that connects both entities (e.g.: RELATIONSHIP - DSA_CONTENT).

  3. Click Save to save or Cancel to discard.

Note: After creating the record, it is necessary to run the Clear cache action from the Configuration Panel (Actions > Clear cache) for the changes to be applied and visible in the Data Portal.

Modifying an Aggregation Relationship in the Grouping table

Modifying an aggregation relationship can be done at any time, as it only affects the lineage visualization and does not impact governed objects.

When modifying a record, it is important to note that the change applies to all layers in which that relationship has been configured as an aggregation. Therefore, any adjustment to the source subtypes (sourceSubtype), destination (destinationSubtype), or the relationship type (relationshipSubtype) will be reflected globally across all affected layers.

Note: After modification, it is necessary to run the Clear cache action from the Configuration Panel (Actions > Clear cache) for the changes to be applied and visible in the Data Portal.


Configuring Aggregation Relationships via direct database access (Developer view)

Aggregation relationships are stored in the anjana.grouping_lineage table.

Column

Data type

Constraints / Notes

id

int4

PRIMARY KEY. Unique identifier of the relationship.

source_subtype

varchar(255)

NOT NULL. Container object subtype (reference to object_subtype.name).

destination_subtype

varchar(255)

NOT NULL. Contained object subtype (reference to object_subtype.name).

relationship_subtype

varchar(255)

NOT NULL. Relationship subtype represented as aggregation.

Below is an example script to configure different aggregation relationships:

SQL
INSERT INTO anjana.grouping_lineage (id, source_subtype, destination_subtype, relationship_subtype)
VALUES
(1, 'DATASET', 'DATASET_FIELD', 'STRUCTURE'),
(2, 'DSA', 'DATASET', 'DSA_CONTENT'),
(3, 'DSA', 'DATA_PRODUCT', 'DSA_CONTENT');

Important:

  • Once the insert has been executed, run the sequence update for the table. (From the Configuration Panel under Actions > Reset DQ sequences, you can update the sequences of all tables, including this one).

  • The full responsibility for the configuration logic lies with the developer executing the SQL queries directly on the tables. It is recommended to carefully review the Table Structure section.