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.
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.
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 theobject_subtypetable) when related to the entity indicated indestinationSubtypevia the relationship type indicated inrelationshipSubtype. -
destinationSubtype: object subtype that appears contained within the object of typesourceSubtype(the name field in theobject_subtypetable) when both are related via the relationship indicated inrelationshipSubtype. -
relationshipSubtype: relationship subtype that connectssourceSubtypewithdestinationSubtypeand is represented in the lineage as an aggregation relationship. Corresponds to the value of the name field in theobject_subtypetable.
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.
Steps from the Configuration Panel:
-
Click the New button in the upper-right corner.
-
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).
-
-
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 |
|
destination_subtype |
varchar(255) |
NOT NULL. Contained object subtype (reference to |
|
relationship_subtype |
varchar(255) |
NOT NULL. Relationship subtype represented as aggregation. |
Below is an example script to configure different aggregation relationships:
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.