{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/data-pipelines/transform-examples/redis-writing-to-multiple-keys",
  "title": "Writing to multiple keys",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/data-pipelines/transform-examples/redis-writing-to-multiple-keys/",
  "summary": "",
  "content": "\nIf you want to write results to multiple keys, you can do so by defining multiple `redis.write` subsections in the `output` section of the job file. Each instance of `redis.write` can specify a different key, data format, and other parameters. For example, you can create two different keys for the same data, one with a default key format and another with a custom key format and mapping.\n\n```yaml\nname: Write to multiple keys with different formats\noutput:\n  - uses: redis.write\n    with:\n      # Setting data_type to JSON and using the default key format\n      data_type: json\n\n  - uses: redis.write\n    with:\n      data_type: json\n\n      # Defining a custom key format\n      key:\n        language: jmespath\n        expression: concat(['events-simplified:id:', id])\n\n      # And defining a custom mapping\n      mapping:\n        - id: id\n        - name: name\n        - location: location\n```\n",
  "tags": ["docs","integrate","rs","rdi"],
  "last_updated": "2026-09-19T17:55:58-07:00"
}
