{
  "id": "remapping-the-output",
  "title": "Remapping the fields in the output",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/transform-examples/remapping-the-output/",
  "summary": "",
  "tags": [
    "docs",
    "integrate",
    "rs",
    "rdi"
  ],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "page_type": "content",
  "content_hash": "cb57a6f37eb352cf44a611f15ce995f35a8dba177175ef8cc3ce8365a0eb71fd",
  "sections": [
    {
      "id": "content",
      "title": "Content",
      "role": "content",
      "text": "Sometimes, you may want to remap the fields in the output of a data pipeline. You can do this by defining a `mapping` section in the output configuration.\n\n[code example]\n\nThe example above remaps the `CustomerId` field to `id`, `FirstName` to `first_name`, and `LastName` to `last_name` in the output. This allows you to customize the field names in the Redis data store according to your application's requirements.\nYou can also use `mapping` to include only the fields you need in the output and exclude the rest.\n\nMapping only allows you to rename fields and limit the output to specific fields and define a single level structure. To create nested structures and/or perform operations on the field values you can use the [map transformation]()."
    }
  ],
  "examples": [
    {
      "id": "content-ex0",
      "language": "yaml",
      "code": "name: Remap customer fields\nsource:\n  table: Customer\n\noutput:\n  - uses: redis.write\n    with:\n      data_type: hash\n      mapping:\n        - CustomerId: id\n        - FirstName: first_name\n        - LastName: last_name",
      "section_id": "content"
    }
  ]
}
