# map

```json metadata
{
  "schema_version": 2,
  "title": "map",
  "description": "Map a record into a new output based on expressions",
  "categories": ["docs","integrate","rs","rdi"],
  "group": "di",
  "tableOfContents": {"sections":[{"id":"expression-object","title":"expression: object"}]}

,
  "codeExamples": []
}
```


Map a record into a new output based on expressions

**Properties**

| Name                          | Type               | Description                                                                                                                                                                                         | Required |
| ----------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| [**expression**](#expression) | `object`, `string` | Expression<br/>                                                                                                                                                                                     | yes      |
| **language**                  | `string`           | Language<br/>Enum: `"jmespath"`, `"sql"`<br/>                                                                                                                                                       | yes      |
| **cache**                     | `object`           | Cache the result of the map expression. See [`cache`](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/reference/data-transformation/cache) for the property list. **Flink processor only.**<br/> | no       |

**Additional Properties:** not allowed

**Example**

```yaml
source:
  schema: dbo
  table: emp
transform:
  - uses: map
    with:
      expression:
        first_name: first_name
        last_name: last_name
        greeting: >-
          'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.'
          ELSE 'N/A' END || ' ' || full_name
        country: country
        full_name: full_name
      language: sql
```

**Example**

```yaml
source:
  table: customer
transform:
  - uses: map
    with:
      expression: |
        {
          "CustomerId": customer_id,
          "FirstName": first_name,
          "LastName": last_name,
          "Company": company,
          "Location":
          {
            "Street": address,
            "City": city,
            "State": state,
            "Country": country,
            "PostalCode": postal_code
          },
          "Phone": phone,
          "Fax": fax,
          "Email": email
        }
      language: jmespath
```

<a name="expression"></a>

## expression: object

Expression

**No properties.**

