{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/data-pipelines/transform-examples/redis-set-example",
  "title": "Write to a Redis set",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/data-pipelines/transform-examples/redis-set-example/",
  "summary": "",
  "content": "\nIn the example below, data is captured from the source table named `invoice` and is written to a Redis set. The `connection` is an optional parameter that refers to the corresponding connection name defined in `config.yaml`. When you specify the\n`data_type` parameter for the job, it overrides the system-wide setting `target_data_type` defined in `config.yaml`.\n\nWhen writing to a set, you must supply an extra argument, `member`, which specifies the field that will be written. In this case, the result will be a Redis set with key names based on the key expression (for example, `invoices:Germany`, `invoices:USA`) and with an expiration of 100 seconds. If you don't supply an `expire` parameter, the keys will never expire.    \n\n```yaml\nname: Write invoices to set by country\nsource:\n  schema: public\n  table: invoice\noutput:\n  - uses: redis.write\n    with:\n      connection: target\n      data_type: set\n      key:\n        expression: concat(['invoices:', BillingCountry])\n        language: jmespath\n      args:\n        member: InvoiceId\n      expire: 100\n```\n",
  "tags": ["docs","integrate","rs","rdi"],
  "last_updated": "2026-09-19T17:55:58-07:00"
}
