# How to use Key mapper

**URL:** <https://forum.alumio.com/t/how-to-use-key-mapper/282>\
**Category:** Transformers\
**Tags:** data-transformer\
**Created:** [November 8, 2022, 12:49pm UTC](https://forum.alumio.com/t/how-to-use-key-mapper/282 "2022-11-08T12:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [November 8, 2022, 12:49pm UTC](https://forum.alumio.com/t/how-to-use-key-mapper/282/1 "2022-11-08T12:49:17Z")

</div>

### **Table Of Contents**

- General description
- The different parts of the Key Mapper
- Guide
- Video guide

### **General description**

The Key Mapper can be used to resolve data inconsistencies between different systems. For example, if the received data contains the key **foo** and the target system contains **bar** , the Key Mapper can be used to bridge the discrepancy. It can also be used to apply a whole array of actions to modify the keys in the data.

### **The different parts of the Key Mapper**

- **Accessor** **(Required field)**  
The accessor defines how the Transformer locates the key(s) that need to be transformed. Several kinds of accessor are available, which work based on given paths in the data and expressions to search.

- **Mappers**  
The Mappers field contains tools that will be applied to the matched key(s). For example, one or multiple mappers can be configured to rename or convert keys in the context data. A Mapper is the data transformation action that takes place on the data found by the accessor.

- **Strip enclosures from keys**  
Enclosures are used when a key contains a dot. For example, “product.name” becomes “product.name”. This can prevent comparators from working as expected (e.g., matching the beginning of a string in a PCRE expression).

### **Guide**

Here’s how you can implement the transformer.

Step 1: Click on Add Data Transformer and select Key Mapper transformer.

Step 2: Select Key Accessor under Accessor.

Step 3: Click on Add Mappers under Mappers and select Dictionary Map.

Step 4: Click on Add Map and then fill up the fields you want to map for a certain data type. You can add multiple maps depending on your requirement.

Step 4: The keys will be mapped and updated by the transformer. You can visualize the same by clicking on the Run Test button.

### **Video guide**

[![](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/001f6f045aebfbf9153c67572313846ffc14db37.jpeg "Key mapper - Changing the name of a key") ](https://www.youtube.com/watch?v=2tpzKB5_hU8)
