Mapping Table definitions

To make transformations that are applied within an Integration Flow reusable and generic, Mapping Tables can be applied via Content Enrichment functions. Each Mapping Table must be designed when creating the Integration Flow version. E.g. name, key columns and value columns must be defined with specific configuration property types so that @deployment time the values in rows can be validated. Mapping Table definitions have to be provided in the Integration Flow metadata JSON file:

{
  "integrationFlow": {
    "integrationFlowId": "16ee7ec3-6d45-475e-b60b-b395dfcedb43",
    "integrationFlowVersion": "1.0.2",
    "description": "Test",
    "changelog": ""
  },
  "flowHistoryTimeToLive": 31,
  "triggerType": "HTTP_ENDPOINT",
  "httpEndpointConfiguration": {  
    "requiredSecurityMechanisms": [ "OIDC_AUTH" ]
  },
  "configurationProperties": [],
  "mappingTableDefinitions": []
}

Mapping Table definitions can be applied for different use cases: - Map single key to single value - Map single key to multiple values - Map combination of keys to a single value - Map combination of keys to multiple values - Map single key to list of values - Map combination of keys to list of values

Examples of these use cases are explained further below.

Mapping tables can be used to map information from keys to values, for example within a transformation step. MappingTableDefinition consists of: - name - keyColumns: ConfigurationProperty[] {ordered} - valueColumns: ConfigurationProperty[] {ordered}

Both keyColumns and valueColums are of ConfigurationProperty type. Therefore, per key- and value column the following information must be provided: - name: unique name of the configuration property within the Integration Flow - type: type of the configuration property. Following types are supported: - HTTP_URL - BOOLEAN - INTEGER (can have min and max value configured) - STRING (can have additional pattern configured) - EMAIL - DROPDOWN (list with allowed values must be configured) - displayName: is used as column title in a Mapping Table that is shown in U4IK portal for the deployment - allowedValues (only for DROPDOWN): list of allowed values for the dropdown list in the rows of the mapping table - min (only for type INTEGER): when "min" is filled for the INTEGER configuration property, the value must be greater than or equal to this min value - max (only for type INTEGER): when "max" is filled for the INTEGER configuration property, the value must be lower than or equal to this max value - pattern (only for type STRING): a pattern for a string value to apply during validation, e.g. [a-z][A-Z]

As shown in the pictures below, it's made clear in the portal what are the key columns, given the key icon in the column header. The columns will be provided with the corresponding control. image.png

Also validation will be applied on input values according to the configuration property type. In this example following types are applied: - "Product code" column is of type DROPDOWN with allowed values - 'Product active" column of type BOOLEAN - "AGB code" column of type INTEGER with min and max value - "Finance manner" of type STRING - "Email address" of type EMAIL - "Message type" of type STRING and isList which results into a free input field where every entered value results in a chip (press <ENTER> after each value to add the item to the list) - "Predefined message type" of type DROPDOWN and isList which results in a multiselect option image.png

The filled table then looks as follows: image.png

Following rules apply for mapping table definitions: - Mapping table definition name should be unique in an Integration Flow version - Key and value column names should be unique for the mapping table definition - Key column cannot be of configurationPropertyType PASSWORD - Key column cannot be of configurationProperty with isList=true - Value column cannot be of configurationPropertyType PASSWORD

Examples

Map single key to single value:

To map a single key to a single value, you have to define a mapping table with one keyColumn and one valueColumn. An example could be a translation table for country codes to country names:

"mappingTableDefinitions": [{
  "name": "Country mappings",
  "keyColumns": [{
    "name": "countryCode",
    "type": "STRING",
    "displayName": "Country code"
  }],
  "valueColumns": [{
    "name": "countryName",
    "type": "STRING",
    "displayName": "Country name"
  }]
}]

At deployment time this table will be shown as follows:

image.png

Map single key to multiple values:

To map a single key to multiple values, you have to define a mapping table with one keyColumn and multiple valueColumns. An example could be a table that maps AGB codes into corresponding UZI and URA numbers:

"mappingTableDefinitions": [{
  "name": "AGB code to UZI and URA number mappings",
  "keyColumns": [{
    "name": "agbCode",
    "type": "INTEGER",
    "min": 10000000,
    "max": 99999999,
    "displayName": "AGB code"
    }],
    "valueColumns": [{
      "name": "uziNr",
      "type": "STRING",
      "displayName": "UZI number"
      },
    {
      "name": "uraNr",
      "type": "INTEGER",
      "min": 10000000,
      "max": 99999999,
      "displayName": "URA number"
    }]
  }]

At deployment time this table will be shown as follows:

image.png

Map combination of keys to a single value:

To map a combination of keys to a single value, you have to define a mapping table with multiple keyColumns and one valueColumn. An example could be a table that maps product code, location and finance manner into a cost centre:

"mappingTableDefinitions": [{
  "name": "Cost centre mappings",
  "keyColumns": [{
    "name": "productCode",
    "type": "DROPDOWN",
    "allowedValues": ["Product code 1", "Product code 2", "Product code 3", "Product code 4", "Product code 5", "Product code 6"],
    "displayName": "Product code"
    },
    {
      "name": "location",
      "type": "STRING",
      "displayName": "Location"
    },
    {
      "name": "financeManner",
      "type": "STRING",
      "displayName": "Finance manner"
    }],
    "valueColumns": [{
      "name": "costCentre",
      "type": "INTEGER",
      "displayName": "Cost centre"
    }]
  }]

At deployment time this table will be shown as follows:

image.png

NOTE: Map combination of keys to multiple values works the same, you just have to define more value columns

Map single key to list of values:

To map a single key to a list of values, you have to define a mapping table with one keyColumn and one valueColumn with isList=true. An example could be a translation table for AGB codes to message types:

"mappingTableDefinitions": [{
  "name": "AGB code to message type list mappings",
  "keyColumns": [{
    "name": "agbCode",
    "type": "STRING",
    "displayName": "AGB code"
  }],
  "valueColumns": [{
    "name": "messageType",
    "type": "STRING",
    "displayName": "Message type",
    "isList": true
    }]
  }]

At deployment time this table will be shown as follows:

image.png

NOTE: Map combination of keys to list of values works the same, you just have to define more key columns

@Deployment time these Mapping Tables must be filled in. Deployment for an Integration Flow must be done via a deployment wizard. This process is further described in Deployment.