Mapping

The purpose of Camel routes is to bring data from the source (a data file) into the model, entities and attributes you defined.

The data file provides the information needed to instantiate the entities, but there is no mechanism to transpose the information in the file into the actual attributes when an instance is created. You require a map to connect the data to the entities in your deployment.

The map or mapping manages the data and actions for you.

Data flow versus data management and data mapping

A common misunderstanding among novices attempting to get data into the deployment involves how data actually arrives in your application. Because we talk about routes, it sometimes feels like some external entity (such as Apache Camel) is supplying data to your application.

This view overlooks two things:

  1. The data isn’t magically flowing into your application; your application is pulling it in; data may be pushed rather than pulled, but the Camel connector still needs to catch the data and pass it to a map for ingesting.
  2. The data you are extracting needs to be mapped onto how Decision Insight understands the data.  An intermediary is needed.



 These intermediaries or indirections are called mappings. They fit into the logical diagram as shown below.


The mappings identify where you want incoming data to reside within the deployment. Mappings take the data as it arrives and shepherd it into the correct location, that is the relevant attributes within the entity.

The Mapping creation screen is fairly complex. It helps to break it down into the relevant parts. When you begin the process of defining a mapping, you will follow through each section in turn.


Screen area Description
Name Name your mapping.
Parameter Definitions Define parameter handles for the data extracted by your route. Associate these handles with key and attribute values in the appropriate section of the Details area. The process of linking parameters to attributes can be relatively simple if you remember to use header names in the routes, and parameter names in the mappings that match the attribute names for the entity you are updating.
Instance Management

Because the deployment includes a time dimension, you must specify how to apply the mapping within that time dimension.

Note: You can have multiple instance operations for a single route.

Key Resolution Tell the deployment how to resolve the data input with a particular instance of entity.
Attribute Action Once the key has selected the correct instance, the Attribute Action area uses the handles in the Parameters area to map data from the route to the attributes of the matching entity. Note: The Key area also uses a handle to specify the route data to use for the key. This means you do not need to have an attribute action for your key – that has already been handled.

Related Links