13.11.1.3 Managing Dimensions and Hierarchies in EDMCS

This section describes how to extend the integration between Enterprise Data Management Cloud Service (EDMCS) and AFCS, including how to add and manage dimensions, attributes, and hierarchies in EDMCS for use in AFCS.

The service includes a set of preconfigured dimensions in EDMCS. However, depending on your business requirements, you need to configure additional metadata, such as creating a new dimension or adding attributes to an existing dimension.

Review the following guidelines before creating or modifying dimensions and attributes.
  • Dimension Naming: You can choose the name of the dimension. However, it is recommended to use the same name as the corresponding dimension in AFCS.
  • Attribute Naming: Attribute names must match the names used in AFCS. Refer to the Catalog for the list of Business Terms (attributes in EDMCS). You can also find the attribute names in the Download Specification document.
  • Attribute Data Type: Attribute data type should be compatible with AFCS Catalog.
  • Hierarchy Rules for Dimensions: Dimensions with hierarchies must follow the validations listed below:

    Table 13-3 Hierarchy Rules for Dimensions

    Validation Rule Description
    Leaf Node Sharing All leaf nodes must be shared across all hierarchies as leaf nodes.
    Intermediate Node Uniqueness Intermediate nodes must be unique within a dimension.
    No Sharing Within Hierarchy A node can appear only once within the same hierarchy.
The following values are generated automatically using EDMCS expressions:
  1. Child Node Id (Child Numeric Identifier): Returns the numeric identifier of the current node using the AFCS Node ID property.
    
    {
    {"statements":
    [{"type":"return","expression":{"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"ca27fb33-1361-493c-95f6-aabd1218b945"}}}}]}
    }
    
  2. Parent Node Id (Parent Numeric Identifier)
    
    {
    {"statements":
    [{"type":"if","condition":{"type":"node","id":"node","invoke":
    {"type":"properties","invoke":{"type":"propertyValue","id":"f803899c-8117-41c4-99dc-0f413849656d","invoke":{"type":"equals","argument":
    {"type":"intLiteral","value":1}}}}},"statements":
    [{"type":"return","expression":
    {"type":"intLiteral","value":0,"invoke":
    {"type":"toNumericString","padLength":
    {"type":"intLiteral","value":0}}}}],"else":
    {"type":"else","statements":[{"type":"return","expression":
    {"type":"node","id":"node","invoke":{"type":"parent","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"ca27fb33-1361-493c-95f6-aabd1218b945"}}}}}]}}]}
    }
    
  3. Node Id (Numeric Identifier)
    
    {
    {"statements":
    [{"type":"return","expression":
    {"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"f85d696d-784a-420f-b9e2-b730a8355b1a"}}}}]}
    }
     
  4. Hierarchy Code
    
    {
    {"statements":
    [{"type":"if","condition":{"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"f803899c-8117-41c4-99dc-0f413849656d","invoke":
    {"type":"equals","argument":{"type":"intLiteral","value":1}}}}},"statements":
    [{"type":"return","expression":
    {"type":"node","id":"node","invoke":{"type":"name"}}}],"else":
    {"type":"else","statements":
    [{"type":"return","expression":
    {"type":"node","id":"node","invoke":
    {"type":"ancestors","invoke":
    {"type":"get","index":{"type":"intLiteral","value":0},"invoke":
    {"type":"name"}}}}}]}}]}
    }
    
  5. Display order number
    
    {
    {"statements":[{"type":"if","condition":
    {"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"f803899c-8117-41c4-99dc-0f413849656d","invoke":
    {"type":"greaterThan","argument":
    {"type":"intLiteral","value":1}}}}},"statements":
    [{"type":"return","expression":{"type":"node","id":"node","invoke":
    {"type":"parent","invoke":{"type":"properties","invoke":
    {"type":"propertyValue","id":"b1819319-1484-4dd0-87df-c3d29a05f30d","invoke":
    {"type":"indexOf","search":{"type":"node","id":"node","invoke":
    {"type":"name"}},"invoke":{"type":"add","argument":
    {"type":"intLiteral","value":1}}}}}}}}],"else":
    {"type":"else","statements":[{"type":"return","expression":
    {"type":"intLiteral","value":0}}]}}]}
    }
    

    For more information on adding Derived Properties, see Derived Properties.

Validations for Dimensions with Hierarchies

The following are the validations for dimensions with Hierarchies:
  • Bottom Node Hierarchy Check- Ensures that the bottom nodes are under each hierarchy (Top Node).
    
    {
    {"statements":[{"type":"if","condition":
    {"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"e75ab694-50b7-40b8-86d0-50f07d9ae8a3","invoke":
    {"type":"not"}}}},"statements":
    [{"type":"comment","value":"If this is not a bottom node then skip the validation"},{"type":"return","expression":
    {"type":"booleanLiteral","value":true}}],"elseifs":
    [{"type":"elseif","condition":{"type":"node","id":"node","invoke":
    {"type":"allAncestors","invoke":{"type":"filter","predicate":
    {"type":"nodePredicate","statements":
    [{"type":"node","id":"thisNode","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"f803899c-8117-41c4-99dc-0f413849656d","invoke":
    {"type":"equals","argument":
    {"type":"intLiteral","value":1}}}}}]},"invoke":
    {"type":"size","invoke":{"type":"equals","argument":
    {"type":"node","id":"node","invoke":
    {"type":"ancestors","invoke":{"type":"get","index":
    {"type":"intLiteral","value":0},"invoke":
    {"type":"siblings","invoke":{"type":"size","invoke":
    {"type":"add","argument":{"type":"intLiteral","value":1}}}}}}}}}}}},"statements":
    [{"type":"comment","value":"Finally check if it is under all top nodes"},
    {"type":"return","expression":{"type":"booleanLiteral","value":true}}]}],"else":
    {"type":"else","statements":[{"type":"return","expression":
    {"type":"booleanLiteral","value":false}}]}}]}
    }
    
  • Bottom Node Hierarchy Check (Remove)- Prevents removing the last location from a hierarchy(Top Node).
    
    {
    {"statements":[{"type":"if","condition":
    {"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"e75ab694-50b7-40b8-86d0-50f07d9ae8a3","invoke":
    {"type":"not"}}}},"statements":
    [{"type":"comment","value":"If this is not a bottom node then skip the validation"},{"type":"return","expression":{"type":"booleanLiteral","value":true}}],"elseifs":
    [{"type":"elseif","condition":{"type":"node","id":"node","invoke":
    {"type":"actions","invoke":{"type":"any","predicate":
    {"type":"actionPredicate","statements":[{"type":"action","id":"action","invoke":
    {"type":"type","invoke":{"type":"isRemove"}}}]}}}},"statements":
    [{"type":"comment","value":"If it is a Request Remove Action then prevent it if this is the last location under the top node. \nNote: this requires visualized mode AND assumes no implicitly shared nodes"},
    {"type":"return","expression":{"type":"node","id":"node","invoke":
    {"type":"locations","excludeImplicitShares":{"type":"booleanLiteral","value":false},"sort":
    {"type":"booleanLiteral","value":false},"invoke":
    {"type":"filter","predicate":{"type":"nodePredicate","statements":
    [{"type":"node","id":"thisNode","invoke":{"type":"properties","invoke":
    {"type":"propertyValue","id":"b3ef0bbe-8f21-4ba5-ad81-d5663f6fb6e0","invoke":
    {"type":"equals","argument":{"type":"node","id":"node","invoke":
    {"type":"properties","invoke":{"type":"propertyValue","id":"b3ef0bbe-8f21-4ba5-ad81-d5663f6fb6e0"}}}}}}}]},
    "invoke":{"type":"size","invoke":{"type":"greaterThan","argument":
    {"type":"intLiteral","value":1}}}}}}}]}],"else":{"type":"else","statements":
    [{"type":"return","expression":{"type":"booleanLiteral","value":true}}]}}]}
    }
    
  • Intermediate Nodes Cannot be Shared- Ensures that only bottom nodes can be shared, and intermediate roll up nodes cannot be shared between hierarchies.
    
    {
    {"statements":[{"type":"if","condition":
    {"type":"node","id":"node","invoke":
    {"type":"properties","invoke":
    {"type":"propertyValue","id":"e75ab694-50b7-40b8-86d0-50f07d9ae8a3","invoke":
    {"type":"equals","argument":{"type":"booleanLiteral","value":false},"invoke":
    {"type":"and","argument":{"type":"node","id":"node","invoke":
    {"type":"locations","excludeImplicitShares":
    {"type":"booleanLiteral","value":false},"sort":
    {"type":"booleanLiteral","value":false},"invoke":
    {"type":"size","invoke":{"type":"greaterThan","argument":
    {"type":"intLiteral","value":1}}}}}}}}}},"statements":
    [{"type":"return","expression":{"type":"booleanLiteral","value":false}}],"else":
    {"type":"else","statements":[{"type":"return","expression":
    {"type":"booleanLiteral","value":true}}]}}]}
    }
    
  • No Sharing Within Hierarchy- Within a hierarchy (Top Node) a node can only be present in one location.
    {
    {"statements":[{"type":"return","expression":
    {"type":"node","id":"node","invoke":
    {"type":"locations","excludeImplicitShares":
    {"type":"booleanLiteral","value":false},"sort":
    {"type":"booleanLiteral","value":false},"invoke":
    {"type":"count","predicate":{"type":"nodePredicate","statements":
    [{"type":"node","id":"thisNode","invoke":{"type":"properties","invoke":
    {"type":"propertyValue","id":"b3ef0bbe-8f21-4ba5-ad81-d5663f6fb6e0","invoke":
    {"type":"equals","argument":{"type":"node","id":"node","invoke":
    {"type":"properties","invoke":{"type":"propertyValue","id":"b3ef0bbe-8f21-4ba5-ad81-d5663f6fb6e0"}}}}}}}]},
    "invoke":{"type":"lessThanOrEqual","argument":{"type":"intLiteral","value":1}}}}}}]}
    }
    
For more information on custom validations, seeEDMCS User Guide.

Adding New Dimensions

For more information on adding dimensions, see EDMCS User Guide.

Adding a Property to an Existing Dimension

For more information on adding a property, see EDMCS User Guide.

Adding an Existing Property to a Dimension

For more information on adding an existing property, see EDMCS User Guide.