# Value Mapper

## <img src="/files/PTOxnqftbREP9p09Binl" alt="" data-size="line"> Value Mapper

### Description <a href="#description" id="description"></a>

The Value Mapper transform maps string values from one value to another.

Mapping is usually solved by storing the conversion table in a database.

The Value Mapper provides you with a simple alternative.

For example, if you want to replace language codes:

```
Fieldname to use: LanguageCode
Target fieldname: LanguageDesc
Source/Target: EN/English, FR/French, NL/Dutch, ES/Spanish, DE/German, ...
```

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

The following properties are used to define the mappings:

| Option                    | Description                                                                                       |
| ------------------------- | ------------------------------------------------------------------------------------------------- |
| Transform Name            | Name of the transform this name has to be unique in a single pipeline.                            |
| Fieldname to use          | Field to use as the mapping source                                                                |
| Target field name         | Field to use as the mapping Target                                                                |
| Default upon non-matching | Defines a default value for situations where the source value is not empty, but there is no match |
| Field values table        | Contains the mapping of source value to converted target value.                                   |

#### Mapping NULL values

If there is an empty source value defined, NULLs and empty strings are mapped to the corresponding target value. Only one empty mapping is allowed.

If the input stream contains NULL values, and no mapping for NULLs is defined, NULL is returned (and not the default target)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/valuemapper.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
