> For the complete documentation index, see [llms.txt](https://docs.brigge.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brigge.ai/documentation/brigge-for-transformers/pipelines/data-transformations.md).

# Data transformations

## Introduction

Transformations are used to change the value, format, and/or node of incoming data for onward processing. Brigge includes a transformation library that can be applied in different contexts, including:

* Mapping rules, via the [map](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/map-node.md) node
* Metadata values, via the [set meta](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/set-meta-node.md) node
* System authentication and endpoint parameters&#x20;

{% hint style="info" %}
Sometimes, the context determines specific configuration rules for a transform function. For example, configuring a [system variable value](#system-variable-value) transform in the map node has different syntax requirements than configuring the same transform for a [system endpoint](/documentation/brigge-for-engineers/systems.md).&#x20;
{% endhint %}

## Available transformations

<details>

<summary>Adjust date</summary>

Adjust date by a given second, minute, hour, day, week, month, or year.

### **Example**

#### **Input**

```json
{"start_date":"2026-05-18"}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FbPq1QQAXWfuaQN3E5NTY%2Fadjust%20date%20config.png?alt=media&amp;token=55c13135-0ed8-4407-a35c-60db69c87e9e" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{"start_date":"2026-06-18"}
```

{% endcode %}

</details>

<details>

<summary>Array math</summary>

Perform a mathematical operation on items in an incoming array and output the result. Available methods are:

* add
* average
* max
* min
* median
* mode

### **Example**

#### **Input**

```json
{"hours": [8.0, 7.5, 8.0, 9.0, 6.5, 4.0, 0.0]}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FcutidtQiZN3SoOWiViOI%2Farray%20math%20config.png?alt=media&amp;token=fa4c9791-66aa-4262-ab77-e2cf2bca9ddc" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{"hours":[43]}
```

{% endcode %}

</details>

<details>

<summary>Array unique</summary>

Take an array of objects and remove duplicates based on one or more fields you specify as `unique keys`. The output is (typically) a deduplicated array, in which only the first occurrence of each unique value (or value combination) is kept.&#x20;

If you specify one key (for example, `employee_id`) it deduplicates on that field alone. If you specify two keys (e.g. `employee_id` and `submitted_date`) it deduplicates on the combination of both.

### **Examples**

The following examples all use the same input payload, below:

{% code lineNumbers="true" %}

```json
[
  {"employee_id": "EMP-001", "submitted_date": "2025-12-14"},
  {"employee_id": "EMP-001", "submitted_date": "2025-12-14"},
  {"employee_id": "EMP-002", "submitted_date": "2025-12-14"},
  {"employee_id": "EMP-003", "submitted_date": "2025-12-21"},
  {"employee_id": "EMP-003", "submitted_date": "2025-12-07"}
]
```

{% endcode %}

Here:

* Rows 2 & 3: duplicate on both fields
* Rows 2, 3 & 4: duplicate on `submitted_date` only
* Rows 5 & 6: duplicate on `employee_id` only

#### **Example 1 (one unique key)**

Here, we want to output array objects but exclude any where the `employee_id` value is duplicated, irrespective of `submitted_date` values.

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F8WSKfsxK5cNJUNCjqIRh%2Farray%20unique%20config.png?alt=media&amp;token=0d89825b-e448-4e78-afea-80de9ac3c913" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

If an `employee_id` is duplicated, only the *first* occurrence is output. Row 2 is duplicated with row 3, so row 3 is dropped; row 5 is duplicated with row 6, so row 6 is dropped:

{% code overflow="wrap" %}

```json
{
  "root": [
    {
      "employee_id": "EMP-001",
      "submitted_date": "2025-12-14"
    },
    {
      "employee_id": "EMP-002",
      "submitted_date": "2025-12-14"
    },
    {
      "employee_id": "EMP-003",
      "submitted_date": "2025-12-21"
    }
  ]
}
```

{% endcode %}

#### **Example 2 (two unique keys)**

Here, we want to output array objects but exclude any where the `employee_id` AND `submitted_date` values are duplicated.&#x20;

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F3jX7csMSWPbzLhXIY19e%2Farray%20unique%20config%202%20keys.png?alt=media&amp;token=93ece281-5a38-4ac4-acb5-065c344df133" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

Rows 2 & 3 are exact duplicates based on both fields, so row 3 is dropped. Notice that `EMP-003` is included twice; this is because these objects have different dates, so there's no duplication based on both fields.&#x20;

{% code overflow="wrap" %}

```json
{
  "root": [
    {
      "employee_id": "EMP-001",
      "submitted_date": "2025-12-14"
    },
    {
      "employee_id": "EMP-002",
      "submitted_date": "2025-12-14"
    },
    {
      "employee_id": "EMP-003",
      "submitted_date": "2025-12-21"
    },
    {
      "employee_id": "EMP-003",
      "submitted_date": "2025-12-07"
    }
  ]
}
```

{% endcode %}

</details>

<details>

<summary>Base64Decode</summary>

Converts a [Base64](https://en.wikipedia.org/wiki/Base64)-encoded string back into its original readable value. This is useful when a source system sends encoded data that must be decoded before being mapped or processed.

### **Example**

#### **Input**

```json
{
  "employee_id": "EMP-001",
  "notes": "T3ZlcnRpbWUgYXBwcm92ZWQgYnkgbWFuYWdlcg=="
}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FOvav5J5LIaARcIIuQRYZ%2Fbase64%20decode%20config.png?alt=media&amp;token=ef56b2a2-291f-4d90-a861-ffdb3e157222" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{
  "employee_id": "EMP-001",
  "notes": "Overtime approved by manager"
}
```

{% endcode %}

</details>

<details>

<summary>Base64Encode</summary>

Converts a plain text value into a [Base64](https://en.wikipedia.org/wiki/Base64)-encoded string. This is useful when a target system expects encoded data, or when sending data over a channel that can't reliably handle raw text.

### **Example**

#### **Input**

```json
{
  "employee_id": "EMP-001",
  "notes": "Overtime approved by manager"
}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FE7DWwH4J1T7snlSmRUif%2Fbase64%20encode%20config.png?alt=media&amp;token=7aa4579f-32ba-48a7-9a7c-7679ddbbe643" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{
  "employee_id": "EMP-001",
  "notes": "T3ZlcnRpbWUgYXBwcm92ZWQgYnkgbWFuYWdlcg=="
}
```

{% endcode %}

</details>

<details>

<summary>Capitalize</summary>

Converts the value to title case (i.e. the first letter of each word is capitalised).

{% hint style="info" %}
If an incoming value is entirely uppercase, it is considered to be an abbreviation and ignored.
{% endhint %}

### **Example**

#### **Input**

```json
[
  {"department": "human resources"},
  {"department": "HUMAN RESOURCES"},
  {"department": "HUMAN Resources"},
  {"department": "HUMAN resources"},
  {"department": "Human resources"},
  {"department": "HR"},
  {"department": "FINANCE"},
  {"department": "It Support"},
  {"department": "PAYROLL"},
  {"department": "operations"}
]
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FCG8YyylUD6aP66C4gUMN%2Fcapitalize%20config.png?alt=media&amp;token=9e1a0c61-4be7-48e6-889e-7e912bc5df9d" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
[
{"department":"Human Resources"},
{"department":"HUMAN RESOURCES"},
{"department":"HUMAN Resources"},
{"department":"HUMAN Resources"},
{"department":"Human Resources"},
{"department":"HR"},
{"department":"FINANCE"},
{"department":"It Support"},
{"department":"PAYROLL"},
{"department":"Operations"}
]
```

{% endcode %}

</details>

<details>

<summary>Concat</summary>

Joins two or more values into a single string, separated by a given delimiter. For example, a source system might output two values for an employe name:

```json
{"first_name": "Jane", "last_name": "Smith"}
```

But the target system requires one value:

```json
{"full_name": "Jane Smith"}
```

In this case, a mapping row would map `first_name` and `last_name` to `name`. Then a `concat` transform is added to join `first_name` and `last_name` values (separated with a space) before sending it in to the target `full_name` field.

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F6DOeowJE0ZtVCSjW8Qmb%2Fconcat%20config%202.png?alt=media&amp;token=d0a5a385-8432-4082-89ca-b1f2d88483a7" alt=""><figcaption></figcaption></figure></div>

### **Example**

#### **Input**

```json
{"first_name": "Jane", "last_name": "Smith"}
```

#### **Transform configuration**

First, we map input `first_name` and `last_name` input fields to the output `full_name` fields

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FZHtJPlhSKHEtM0rNWzZa%2Fconcat%200.png?alt=media&amp;token=6b06c1cc-2ca8-4448-838b-28a673edcda4" alt=""><figcaption></figcaption></figure>

With the mapping row selected, we [add a concat transformation](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/map-node.md#adding-transformations) and configure settings as below:

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2Ff1KranOw8n5tqsI5fK08%2FConcat%20transform%202.svg?alt=media&amp;token=2ec39ae8-55ed-436b-8a2c-64ab176a29f5" alt=""><figcaption></figcaption></figure>

Fields to note are summarised below:

<table><thead><tr><th width="49.15447998046875">#</th><th width="179.3367919921875">Field</th><th>Summary</th></tr></thead><tbody><tr><td>1</td><td>Value to transform</td><td>Provided you selected the full mapping row before choosing to add the transformation, the default value will be the last input field in the mapping. You can choose an alternative input from this dropdown list.</td></tr><tr><td>2</td><td>Delimiter</td><td>Enter any ASCII character to separate each joined value. A space can also be used.</td></tr><tr><td>3</td><td>Inputs</td><td>Add all subsequent fields to be joined. The dropdown list will include all input fields for the selected mapping - add these in join sequence.</td></tr></tbody></table>

#### **Output**

{% code overflow="wrap" %}

```json
{"full_name":"Jane Smith"}
```

{% endcode %}

</details>

<details>

<summary>Custom value</summary>

Replaces or sets a field value with a fixed, hardcoded value.&#x20;

### Example 1 (override existing source values)

A target system requires a `pay_currency` field value set to YEN; incoming payloads include this field but with a range of values. You need to override any values received with YEN.&#x20;

In this case, a mapping row would map `pay_currency` to `pay_currency` as normal. Then, a `custom value` transform is added for this row, with YEN as the value.

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FNwXMzo8fLtI1vR9326Hi%2Fcustom%20value%20config%20-%20overwrite%20source.png?alt=media&amp;token=7246ec0c-5460-45aa-99da-124c23d3b7ad" alt=""><figcaption></figcaption></figure></div>

#### **Input**

```json
{"pay_currency": "USD"}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FpgH2LkGofBvdME8stmv2%2Fcustom%20value%20config%20-%20overwrite%20source%20a.png?alt=media&amp;token=b0f75ea7-bf1a-4cb9-87ba-902165a43e75" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{"pay_currency": "YEN"}
```

{% endcode %}

### Example 2 (add source values)

A target system requires a `pay_currency` field value; incoming payloads do not include this field, so you need to add it with a fixed value of YEN.

In this case, the mapping row would not have a source field. Instead, select the target field and then add a `custom value` transform with YEN as the value.

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FfdVQs9euPzrVW4aEPNSL%2Fcustom%20value%20mapping%20-%20add%20source.png?alt=media&amp;token=9c12b7c6-5f10-4bdb-83a0-7ec5cd889fc6" alt=""><figcaption></figcaption></figure></div>

#### **Input**

No input value to transform.

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FlDoTffGqRypVOnlhIQgR%2Fcustom%20value%20config%20-%20add%20source.png?alt=media&amp;token=17ab2510-fc2d-4495-8237-5457187d6e15" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{"pay_currency": "YEN"}
```

{% endcode %}

</details>

<details>

<summary>Data warehouse lookup</summary>

Outputs stored values from a specified [data warehouse](broken://pages/4HCG40qS88ubOtAji8OK) for onward processing.

### Example

Suppose we are syncing employee data to a target system which requires multiple fields, including `department`. But, our source data has no `department` values - incoming payloads are in the form:

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "id": "EMP-001",
  "first_name": "James",
  "last_name": "Okafor",
  "department": "Unknown"
}
```

{% endcode %}

Fortunately, employee `department` details are regularly pushed to a data warehouse with the associated employee id. This is stored in the form:

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "employee_id": "EMP-001",
  "department": "Engineering"
}
```

{% endcode %}

Using the `data warehouse lookup` transformation, we can populate incoming `department` field values (currently set to `Unknown`) with stored data warehouse values, matching against incoming `id` and stored `employee_id` values.  &#x20;

#### The config

First, we map input `id` fields to output `department` fields:

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FvWBHR5cHnh4ie83Y3cgJ%2Fdata%20warehouse%20lookup%20a.png?alt=media&amp;token=7b7dc42a-a6a4-4101-b93d-178fef6b253b" alt=""><figcaption></figcaption></figure>

In this case, we know that input `id` and output `department` fields are not a direct mapping. That's OK - we are just defining which input fields to use for a lookup query in the data warehouse.&#x20;

This makes more sense when we go on to add our `data warehouse lookup` transformation for this mapping row. For example:

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FPDvEJf5fovayOSpcK8t3%2Fdata%20warehouse%20transform%20config.svg?alt=media&amp;token=263b88ca-d80c-4d7d-914e-c572893dde3b" alt=""><figcaption></figcaption></figure>

Here we configure: which data warehouse to query, a lookup query that matches incoming values to warehouse records, and which warehouse field to return when a match is found. The important fields to configure are:

<table><thead><tr><th width="49.15447998046875">#</th><th width="179.3367919921875">Field</th><th>Summary</th></tr></thead><tbody><tr><td>1</td><td>Data warehouse</td><td>Select the data warehouse that contains values you want to output. </td></tr><tr><td>2</td><td>Field to select</td><td>Select which field in the data warehouse you want to output upon a successful lookup match.</td></tr><tr><td>3</td><td>Lookup field(s)</td><td>Choose which <em>data warehouse</em> field should be used to match records with input data.</td></tr><tr><td>4</td><td>-</td><td>Choose a match operator for the lookup. In this case, we have selected 'equals'.</td></tr><tr><td>5</td><td>-</td><td>Choose which <em>input</em> field provides the value to be matched against the <em>data warehouse</em> field. Any <code>input</code> fields selected for this mapping row are available for selection here.</td></tr></tbody></table>

</details>

<details>

<summary>Date format</summary>

Converts the incoming date format to a selected format.

{% hint style="info" %}
This transformation is exactly the same as [format date](#format-date).&#x20;
{% endhint %}

### **Example**

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FU7R8AzK1a5VVKwSl1EvO%2Fdate%20format%20mapping.png?alt=media&amp;token=0c01a795-a125-40d1-8cea-3a1e004d6f1e" alt=""><figcaption></figcaption></figure>

#### **Input**

```json
{
 "start_date":"2025-01-15T00:00:00Z"
}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FBKiLJ57jtzwDoVXZ238M%2Fdate%20format%20config.png?alt=media&amp;token=11d1a407-09dd-48f4-a33f-f7811ec1674d" alt="" width="561"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{
  "started":"2025-01-15"
}
```

{% endcode %}

</details>

<details>

<summary>End of week</summary>

Takes an input date and shifts it forward to the configured end of week day. If the input date falls on the end of week day itself, no shift occurs. If it falls on any other day, the date moves forward to the next occurrence of that day.

The new date is output in ISO 8601 and includes a time set to one second before midnight, UTC.

### **Example**

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F3BHRCKhm7N9BpqEONSQl%2Feow%20mapping.png?alt=media&amp;token=d0d6b0b5-7aef-4fd0-af81-2971f85277d3" alt=""><figcaption></figcaption></figure>

#### **Input**

<pre class="language-json" data-line-numbers><code class="lang-json"><strong>{"date":"2025-05-21"},
</strong>{"date":"20250521"},
{"date":"May 21, 2025"},
{"date":1747785600},
{"date":"2025-05-21T00:00:00Z"},
{"date":"2025/05/21"},
{"date":"21 May 2025"}
</code></pre>

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2Fa37NUc4fpH5jObFFiiUH%2Feow%20config%20a.png?alt=media&amp;token=aa0af501-e5bc-4193-a579-ed8094cbf5e9" alt=""><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"},
{"eow":"2025-05-25T23:59:59+00:00"}
```

{% endcode %}

</details>

<details>

<summary>Environment variable value</summary>

Outputs the value of a specified environment variable. You pass the variable name as an input value and the transformation outputs the value assigned to that variable in the pipeline's runtime environment.

### **Example**

Our `production` [environment](/documentation/brigge-for-transformers/environments.md) is configured with a variable named `base_url`:

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FLwaR53r53u8eXtaBWh4C%2Fenv%20variable%20defined%20b.png?alt=media&amp;token=5e841fe2-b27e-47c4-9525-b9640342c207" alt=""><figcaption></figcaption></figure></div>

If the `base_url` variable is used in a pipeline and that pipeline runs in the `production` environment, the resolved value will be `https://prod.brigge.com`.&#x20;

#### **Input**

{% code lineNumbers="true" %}

```json
{"gateway":"base_url"}
```

{% endcode %}

#### **Mapping**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FrZwLgJY7pgNzXYR1Nh5V%2Fenv%20variable%20map.png?alt=media&amp;token=f011db2e-f4c5-4c2a-a5a4-cae81d285237" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FCBpmfrOVxpp6oHRG9xV7%2Fenv%20variable%20config%202.png?alt=media&amp;token=16c5d990-1e24-4aa6-9646-cb2295a6b2ef" alt=""><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{"gateway":"https://prod.brigge.com"}
```

{% endcode %}

</details>

<details>

<summary>Fallback value</summary>

Define a value to be output for a field if the incoming value is empty, or set to a given value.&#x20;

### **Example**

Incoming data includes staff records where the `department` field value could be empty, `unknown`, or a valid value. We need to replace empty or `unknown` values with a fallback value of `General Staff`. &#x20;

#### **Input**

{% code lineNumbers="true" %}

```json
{
  "records": [
    {
      "id": "EMP-001",
      "first_name": "James",
      "last_name": "Okafor",
      "department": ""
    },
    {
      "id": "EMP-002",
      "first_name": "Sarah",
      "last_name": "Mitchell",
      "department": "Unknown"
    },
    {
      "id": "EMP-003",
      "first_name": "David",
      "last_name": "Reyes",
      "department": "UNKNOWN"
    },
    {
      "id": "EMP-004",
      "first_name": "Priya",
      "last_name": "Sharma",
      "department": "Product"
    },
    {
      "id": "EMP-005",
      "first_name": "Laura",
      "last_name": "Chen",
      "department": "Finance"
    }
  ]
}
```

{% endcode %}

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FFuR0UOdzKUt0Cg1MVE56%2Ffallback%20value%20map.png?alt=media&amp;token=2edf1b8d-8dae-4afc-a205-2c35cc1fae38" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FLUPQ8qZoAjXgU3jgD8ld%2Ffallback%20value%20config.png?alt=media&amp;token=37d90039-0c04-4d85-b302-39ab94af003a" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Values to replace are case sensitive. If you want to apply the fallback for empty values, press the spacebar, or enter `<empty_string>`.
{% endhint %}

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "records": [
    {
      "id": "EMP-001",
      "first_name": "James",
      "last_name": "Okafor",
      "department": "General Staff"
    },
    {
      "id": "EMP-002",
      "first_name": "Sarah",
      "last_name": "Mitchell",
      "department": "General Staff"
    },
    {
      "id": "EMP-003",
      "first_name": "David",
      "last_name": "Reyes",
      "department": "General Staff"
    },
    {
      "id": "EMP-004",
      "first_name": "Priya",
      "last_name": "Sharma",
      "department": "Product"
    },
    {
      "id": "EMP-005",
      "first_name": "Laura",
      "last_name": "Chen",
      "department": "Finance"
    }
  ]
}
```

{% endcode %}

</details>

<details>

<summary>Flatten</summary>

Takes a nested array structure and outputs a flat array.

### **Example**

Incoming data includes skills matrix data, where the `tags` array includes objects with an `id` and a `name`.  We want to output just the tag names as a list.&#x20;

#### **Input**

{% code lineNumbers="true" %}

```json
{
  "article": {
    "title": "Skills Matrix",
    "tags": [
      {"id": 1, "name": "Python"},
      {"id": 2, "name": "PHP"},
      {"id": 3, "name": "Javascript"}
    ]
  }
}
```

{% endcode %}

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FNoMNHyvVBd4G9gCZ7q1E%2Fflatten%20mapping.jpg?alt=media&amp;token=3eed5090-8469-4207-97ee-e25345faed24" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FUmpoB1XVE44JaR24zjO7%2Fflatten%20config.jpg?alt=media&amp;token=9566c69a-44cf-4138-a5c6-38479f8d0fdb" alt=""><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "article": {
    "title": "Skills Matrix",
    "tags": [
      "Python",
      "PHP",
      "Javascript"
    ]
  }
}
```

{% endcode %}

</details>

<details>

<summary>Format date</summary>

Converts the incoming date format to a selected format.

{% hint style="info" %}
This transformation is exactly the same as [date format](#date-format).&#x20;
{% endhint %}

### **Example**

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FU7R8AzK1a5VVKwSl1EvO%2Fdate%20format%20mapping.png?alt=media&amp;token=0c01a795-a125-40d1-8cea-3a1e004d6f1e" alt=""><figcaption></figcaption></figure>

#### **Input**

```json
{
 "start_date":"2025-01-15T00:00:00Z"
}
```

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FBKiLJ57jtzwDoVXZ238M%2Fdate%20format%20config.png?alt=media&amp;token=11d1a407-09dd-48f4-a33f-f7811ec1674d" alt="" width="561"><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" %}

```json
{
  "started":"2025-01-15"
}
```

{% endcode %}

</details>

<details>

<summary>Join</summary>

Collapses an array of values into a single string, joined with a delimiter between each element.

{% hint style="info" %}
More join options are available via the [*Merge* node](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/merge-node.md).&#x20;
{% endhint %}

### **Example**

Incoming data includes skills matrix data, where the `tags` array includes a list of skills.  We want to output this list as a single string, delimited with a comma.&#x20;

#### **Input**

{% code lineNumbers="true" %}

```json
{
  "article": {
    "title": "Skills Matrix",
    "tags": ["Python", "PHP", "Javascript"]
  }
}
```

{% endcode %}

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F2qwqcGQeyHLdfUpp8fmQ%2Fjoin%20mapping.jpg?alt=media&amp;token=a14a3a68-51c9-4fbe-86cf-a59de4609ff4" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FEHiTgNRcaTdl5QxbAdiQ%2Fjoin%20config.png?alt=media&amp;token=ef8cdae0-6650-47ac-83d7-d1c5fc59900c" alt=""><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "article": {
    "title": "Skills Matrix",
    "tags": "Python,PHP,JavaScript"
  }
}
```

{% endcode %}

</details>

<details>

<summary>Gunzip</summary>

Decompresses a [gzip-compressed value](#gzip) back into its original form. Incoming (compressed) data is decompressed and then mapped.

</details>

<details>

<summary>Gzip</summary>

Compresses incoming data.  for the given field. Incoming data is compressed and then mapped.

</details>

<details>

<summary>Length</summary>

Returns the length of a string or array as a number. For a string, the length is the character count. For an array, it's the number of elements.

</details>

<details>

<summary>Lower</summary>

Convert incoming values to lowercase.

</details>

<details>

<summary>Pad</summary>

Pads a string to a specified total length by adding a character to the start or end.

</details>

<details>

<summary>Math</summary>

Performs a basic arithmetic operation on a numeric field using a second (defined) value and outputs the calculated value.

</details>

<details>

<summary>Metadata value</summary>

Retrieves a metadata value (defined via a [set metadata node](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/set-meta-node.md) or a [custom script](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/custom-script-node.md)) and outputs it to the target field. Enter the required metadata key name as the value to transform. &#x20;

{% hint style="info" %}
If you are outputting a [meta variable](/documentation/brigge-for-transformers/pipelines/pipeline-variables.md#meta-variables) via the [map node](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/map-node.md), do not use standard `{{meta.variable}}` syntax (`{{meta.variable_name}`}. Instead, enter the variable name with no template syntax - for example: `batch_id`.&#x20;
{% endhint %}

</details>

<details>

<summary>Pgp decrypt</summary>

Reverses a [PGP encrypt](#pgp-encrypt). Takes an encrypted PGP string and decrypts it back to plain text using a PGP private key. To configure this transform you will need your PGP private key and password.

</details>

<details>

<summary>Pgp encrypt</summary>

Takes a plain text field value and encrypts it using a PGP public key, producing an encrypted string that only the holder of the corresponding private key can decrypt. To configure this transform you will need your PGP public key and (if the key is protected) a passphrase.

</details>

<details>

<summary>Pluck by key</summary>

Extracts the value of one named field from each object in an array and returns those values as a flat array.

### **Example**

Incoming data includes a `customers` array with `id` and `email` values for each customer. We want to output all `email` values as a single `emails` array. &#x20;

#### **Input**

{% code lineNumbers="true" %}

```json
{
  "customers": [
    { "id": "CUST-1001", "email": "priya.n@example.com" },
    { "id": "CUST-1002", "email": "marco.d@example.com" },
    { "id": "CUST-1003", "email": "amara.o@example.com" }
  ]
}
```

{% endcode %}

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FrJsMpz88qK6rWgvgTsIC%2FPluck%20by%20key%20-%20map.png?alt=media&amp;token=daa4f349-3dd2-4c57-9f94-bb2643e9597c" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2Fwq1gG6ljiYIZgq89nnE0%2FPluck%20by%20key%20-%20transform.png?alt=media&amp;token=445d64c3-696e-48f9-9549-9c4e79f55ef3" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="182.21484375">Field</th><th>Summary</th></tr></thead><tbody><tr><td>Value to transform</td><td>Set to the array containing the objects you want to pluck from - for example; <code>root.customers.*</code>. This should be the array itself, not a single element inside it.</td></tr><tr><td>Key</td><td>Enter the field name to extract from each object - for example, <code>email</code>. This must match the actual key name in the source objects (not a path to your output field).</td></tr></tbody></table>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "emails": [
    "priya.n@example.com",
    "marco.d@example.com",
    "amara.o@example.com"
  ]
}
```

{% endcode %}

</details>

<details>

<summary>Pluck where</summary>

Filters an array of objects by a condition, then extracts a specific field from the matching records.&#x20;

### **Example**

Incoming data includes an `items` array with `id` and `email` values for each record. We want to find all records where `id` is `1`, and output the `email` value from each matching record as a single array.

#### **Input**

{% code lineNumbers="true" %}

```json
{
  "items": [
    { "email": "sophie@example.com", "id": 1 },
    { "email": "bob@example.com", "id": 2 },
    { "email": "fred@example.com", "id": 3 }
  ]
}
```

{% endcode %}

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FK7WVhx9vKWNdTYdjLpFW%2Fpluck%20where%20mapping.png?alt=media&amp;token=c40ec8b2-fa8d-466c-9b26-c5f6098a686a" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FUJ3fv5Yy2MKXiM9i980t%2Fpluck%20where%20transform.png?alt=media&amp;token=f04041f2-2c46-4d27-ba7a-265010709475" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="182.21484375">Field</th><th>Summary</th></tr></thead><tbody><tr><td>Value to transform</td><td>Set to the array containing the objects to search - for example: <code>root.items</code>. This should be the array itself, not a single element inside it.</td></tr><tr><td>Where</td><td>The field name to match against, relative to each object in the array - for example: <code>id</code>.  </td></tr><tr><td>Value</td><td>The value to match for the <code>where</code> field - for example: <code>1</code>.</td></tr><tr><td>Pluck</td><td>The field name to extract from each matching object.</td></tr></tbody></table>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{"items":"sophie@example.com"}
```

{% endcode %}

</details>

<details>

<summary>Render template</summary>

Renders a template string by resolving variable placeholders against the current pipeline context at runtime.You can combine variables to form composite values and, if needed, include static template trext.

The following variable types are supported: `{{payload.key}}`, `{{meta.key}}`, `{{env.key}}`, and {`{system.key}}`.

### **Example**

The pipeline includes a set meta node which applies a `source` value at runtime. The environment (in which this pipeline runs) includes a `source_prefix` variable with a default value set to `TEST`. We want to combine both into a single formatted string and write it to the `source` field, with some static text first.

#### **Input**

<pre class="language-json" data-line-numbers><code class="lang-json">1  {
  "timesheet_id": "TS-2026-00341",
  "employee": {
    "id": "EMP-1042",
    "name": "Marcus Ellwood",
    "email": "m.ellwood@example.com"
  },
  "pay_period_start": "2026-06-01",
  "pay_period_end": "2026-06-14",
  "hours_worked": 76.5,
  "hours_invoiced": 72,
  "hours_toil": 4.5,
<strong>  "source": "unknown",
</strong>  "status": "approved"
}
</code></pre>

#### **Mapping**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FUVDPTPF4Gmo6nNTH5D20%2Frender%20template%20map.png?alt=media&amp;token=e0eb56fc-83da-429a-a32d-5b253b1318c4" alt=""><figcaption></figcaption></figure></div>

#### **Transform configuration**

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FsogTorAupPAysrkaJoGU%2Frender%20template%202%20map.png?alt=media&amp;token=c027d824-912b-4277-8cba-3e9e13b654ef" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="182.21484375">Field</th><th>Summary</th></tr></thead><tbody><tr><td>Value to transform</td><td>Set to the template string you want to render - static text and variable references can be combined as needed. </td></tr></tbody></table>

#### **Output**

<pre class="language-json" data-overflow="wrap" data-line-numbers><code class="lang-json">{
  "timesheet_id": "TS-2026-00341",
  "employee": {
    "id": "EMP-1042",
    "name": "Marcus Ellwood",
    "email": "m.ellwood@example.com"
  },
  "pay_period_start": "2026-06-01",
  "pay_period_end": "2026-06-14",
  "hours_worked": 76.5,
  "hours_invoiced": 72,
  "hours_toil": 4.5,
<strong>  "source": "Origin: TEST-EXPO26",
</strong>  "status": "approved"
}
</code></pre>

</details>

<details>

<summary>Reverse flatten</summary>

Takes a flat array and re-introduces nesting (the opposite of [flatten](#flatten)). The required element name is specified as the `target element`.

</details>

<details>

<summary>Replace</summary>

Finds a specified string within the input field value and replaces it with another string. You specify the string to find and the replacement string.

</details>

<details>

<summary>Select array index</summary>

Retrieves a single element from an array by its position. The `index` field takes a zero-based number, so `0` returns the first element, `1` the second, and so on.

</details>

<details>

<summary>Sign JWT</summary>

Takes a payload value and signs it as a JSON Web Token (JWT) using a private key. This produces a signed token string that can be verified by a target system using the corresponding public key.

</details>

<details>

<summary>Sign XML</summary>

Applies a digital signature to an incoming XML value, producing a signed XML document.&#x20;

</details>

<details>

<summary>Split</summary>

Takes a delimited string and produces an array (the reverse of [join](#join)). &#x20;

</details>

<details>

<summary>Start of week</summary>

Takes an input date and shifts it back to the configured start of week day. If the input date falls on the start of week day itself, no shift occurs. If it falls on any other day, it moves back to the most recent occurrence of that day.

The new date is output in ISO 8601 and includes a time set to one second before midnight, UTC.

### **Example**

<figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F3BHRCKhm7N9BpqEONSQl%2Feow%20mapping.png?alt=media&amp;token=d0d6b0b5-7aef-4fd0-af81-2971f85277d3" alt=""><figcaption></figcaption></figure>

#### **Input**

<pre class="language-json" data-line-numbers><code class="lang-json"><strong>{"date":"2025-05-21"},
</strong>{"date":"20250521"},
{"date":"May 21, 2025"},
{"date":1747785600},
{"date":"2025-05-21T00:00:00Z"},
{"date":"2025/05/21"},
{"date":"21 May 2025"}
</code></pre>

#### **Transform configuration**

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FeZ9yGa8ggV9DW0DImZ9f%2Fstart%20of%20week%20config.png?alt=media&amp;token=cc92534a-738c-4d6d-9fdb-cd1230024e36" alt=""><figcaption></figcaption></figure></div>

#### **Output**

{% code overflow="wrap" lineNumbers="true" %}

```json
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"},
{"sow":"2025-05-18T00:00:00+00:00"}
```

{% endcode %}

</details>

<details>

<summary>Substring</summary>

Extracts a sub-section of a string, starting at a given position.

</details>

<details>

<summary>System variable value</summary>

Output a system variable value (for example, pipeline run id, pipeline name, environment name).

{% hint style="info" %}
If you are outputting a system variable via the map node, do not use `{{system.variable}}` templates (e.g. `{{system.pipeline_run_id}`}. Instead, choose to enter the variable name manually and specify the template content (e.g. `pipeline_run_id`).&#x20;
{% endhint %}

</details>

<details>

<summary>To boolean</summary>

Converts a field value to a boolean (`true` or `false`). Use `true values` and `false values` lists to define what counts as `true` and false, respectively (common variations are defined - edit, remove or add values as needed).

</details>

<details>

<summary>To float</summary>

Converts the incoming field value to a floating point number (a number with a decimal point).

</details>

<details>

<summary>To integer</summary>

Converts the incoming field value to a whole number (any decimal portion is removed).

</details>

<details>

<summary>To string</summary>

Converts a numeric or boolean value to a string.

</details>

<details>

<summary>Trim</summary>

Removes specified characters from the start and end of a string. To trim whitespace, enter a space in the `characters` field.

</details>

<details>

<summary>Upper</summary>

Convert incoming values to uppercase.

</details>

<details>

<summary>Url Param</summary>

Extracts a specific query parameter value from a URL string. Use the `key` field to specify the parameter name to extract.

</details>
