Configuration
Breadcrumbs

Relationships Between Reference Values

In Anjana Data it is possible to configure dependencies between reference attribute values (selector-type attributes: SELECT, MULTI_SELECT, TREE_SELECT, etc.) so that selecting a value in one attribute determines the available values in another.

This mechanism allows reflecting the organization's own data ecosystem logic and ensures consistency in value selection during the creation or editing of governed objects.

image-20250910-095921.png
Example of relationships between the infrastructure-technology-zone triplet metadata

For example, if Amazon S3 is selected as the technology when creating a DATASET, only compatible values will be available in the zone dropdown (example: Gold).
In this way, the system ensures that the infrastructure–technology–zone value combination is always valid and consistent with the reference configuration.

Attribute Relationships Table in the Configuration Panel (Administrator view)

These dependencies are configured in the Attribute Relationships table.

image-20250910-101138.png
Attribute Relationship table for adding relationships between reference values

Structure of the Attribute Relationship table

Each registered relationship is characterized by the following fields:

  • Id: unique identifier of the record. Automatically assigned from the Configuration Panel.

  • destinationValue: value of the dependent attribute (the one that is filtered). Corresponds to a value defined in the Attribute Definition Value table, i.e., one of the configured options for a reference attribute.

  • sourceValue: value of the source attribute on which the previous one depends. Also corresponds to a value defined in the Attribute Definition Value table. It is the value whose selection determines or filters the destinationValue.

For taxonomy-type attributes (TREE_SELECT or TREE_MULTISELECT), values must be organized as a tree. Reference values that act as root nodes (top level of the hierarchical tree) must have <null> as their sourceValue, which tells the platform the beginning of a branch.

  • objectSubType: object subtype in which the relationship applies. Corresponds to a subtype configured in the Object Sub-types table. If defined as NULL, the relationship will be global and will apply in any template where both attributes are present.

Important:

For relationships to be correctly applied between reference values of different metadata attributes, the dependency validation (DEPENDS_ON) must be configured in the Template Attribute Validations table.

Adding an attribute in the Attribute Relationship table

Adding a new relationship between attribute values involves adding a new record to the Attribute Relationship table that defines the dependency between a source value (sourceValue) and a destination value (destinationValue).

image-20250910-110758.png
Example of adding the relationship between the technology Amazon S3 and the zone Gold for the DATASET object subtype

To add a new relationship:

  1. Click the New button in the top-right corner. This will open a wizard with the fields defined in the Structure of the Attribute Relationship table section.

  2. Fill in the fields according to the structure described:

    • destinationValue: select the dependent value from the list of values defined in the Attribute Definition Value table (e.g., 2105-Gold-zone).

    • sourceValue: select the source value from the list of values defined in the Attribute Definition Value table (e.g., 2104-Amazon S3-technology).

    • objectSubType: select the object subtype in which the relationship applies, from those configured in the Object Sub-Types table (e.g., DATASET).

  3. Click Save to save the relationship or Cancel to discard it.

Note

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

Example of adding a taxonomy-type attribute

The following shows how to configure the hierarchy tree of a taxonomy-type attribute (TREE_SELECT or TREE_MULTISELECT) such as the one shown in the image below:

image-20250910-142558.png
Example of a taxonomy-type attribute composed of a hierarchical tree of reference values

Steps to set up the hierarchy tree:

  1. Register the attribute in Attribute Definitions and the reference values in Attribute Definition Value

  2. In Attribute Relationship you must:

    1. Indicate that the reference value Customers is the first level of the tree, to do this:

      1. sourceValue must have the value <null>

      2. destinationValue must reference the value Customers

      3. destinationValue must reference the object subtype DATASET

    2. Indicate that the reference value Demographic data (name, age, gender, etc.) is a child of the value Customers, to do this:

      1. sourceValue must have the value Customers

      2. destinationValue must reference the value Demographic data (name, age, gender, etc.)

      3. destinationValue must reference the object subtype DATASET

    3. Indicate that the reference value Purchase history is a child of the value Customers, to do this:

      1. sourceValue must have the value Customers

      2. destinationValue must reference the value Purchase history

      3. destinationValue must reference the object subtype DATASET

    4. Repeat the previous section for all values that are children of Customers

Modifying a relationship in the Attribute Relationship table

Modifying an existing relationship must be done with caution, as it can impact the display and consistency of reference values in the Data Portal.

  • If no governed objects exist in the Data Portal:
    All three fields of the relationship can be freely modified:

    • destinationValue (destination value, taken from the Attribute Definition Value table),

    • sourceValue (source value, taken from the Attribute Definition Value table),

    • objectSubType (subtype to which the relationship applies, configured in the Object Sub-Type table).

  • If governed objects exist in the Data Portal:
    Changes can only be made to the extent that they do not affect already created objects.
    In particular:

    • A relationship between a destinationValue and a sourceValue for a specific objectSubType cannot be deleted or modified if objects of that subtype already exist that simultaneously contain those values in their source and destination attributes.

    • In these cases, the only option will be to maintain the existing relationship or delete it and redefine it after performing a controlled adjustment on the governed objects.

Note

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


Configuring relationships between reference values via direct database access (Developer view)

Relationships between reference values are stored in the anjana.attribute_relationships table. These relationships allow establishing dependencies between the values of two attributes configured in the anjana.attribute_definition_value table, so that selecting a value in the source attribute filters the available values in the destination attribute.

Column

Type

Constraints / Notes

id_attribute_relationships

int4

PRIMARY KEY. Unique identifier of the relationship. Managed by sequence.

object_sub_type

varchar(255)

Can be NULL. Indicates the object subtype to which the relationship applies. Must correspond to a name defined in the anjana.object_subtype table.

destination_value

int4

Destination value of the relationship. FK to anjana.attribute_definition_value(id_attribute_definition_value).

source_value

int4

Source value of the relationship. FK to anjana.attribute_definition_value(id_attribute_definition_value).

The following example defines a relationship so that, in the DATASET subtype template, the technology value Amazon S3 (sourceValue = 2104) only allows selecting the zone Gold (destinationValue = 2105):

SQL
INSERT INTO anjana.attribute_relationships
(id_attribute_relationships, object_sub_type, destination_value, source_value)
VALUES(1176, 'DATASET', 2105, 2104);

Important:

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

  • The entire responsibility for the configuration logic falls on the developer executing SQL queries directly against the tables. It is strongly recommended to carefully review the Structure section.