{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/reference/data-transformation/lookup",
  "title": "redis.lookup",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/lookup/",
  "summary": "Lookup data from Redis using the given command and key",
  "tags": [
    "docs",
    "integrate",
    "rs",
    "rdi"
  ],
  "last_updated": "2026-09-18T16:47:14+01:00",
  "page_type": "content",
  "content_hash": "526f107b974fb6fbfb05c42bbfe394de5b722eceb1e608e5109dca0010c4f1dc",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "**Properties**\n\n| Name                | Type       | Description                                                                                                                                                                                                                                                          | Required |\n| ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| **connection**      | `string`   | Connection name                                                                                                                                                                                                                                                      | yes      |\n| **cmd**             | `string`   | The command to execute                                                                                                                                                                                                                                               | yes      |\n| [**args**](#args)   | `string[]` | Redis command arguments                                                                                                                                                                                                                                              | yes      |\n| **language**        | `string`   | Language<br/>Enum: `\"jmespath\"`, `\"sql\"`<br/>                                                                                                                                                                                                                        | yes      |\n| **field**           | `string`   | The target field to write the result to<br/>                                                                                                                                                                                                                         | yes      |\n| **cache**           | `object`   | Cache the result of the argument expressions. See [`cache`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/cache) for the property list. **Flink processor only.**<br/>                                                            | no       |\n| **lookup_cache**    | `object`   | Cache the lookup results returned by Redis across batches, keyed by the resolved command arguments. Uses the same property list as [`cache`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/cache). **Flink processor only.**<br/> | no       |\n| [**batch**](#batch) | `object`   | Override the default batching behavior for `redis.lookup` lookups. **Flink processor only.**<br/>                                                                                                                                                                    | no       |\n\n**Additional Properties:** not allowed\n\n**Items**\n\n**Item Type:** `string`"
    },
    {
      "id": "batch",
      "title": "batch: object",
      "role": "content",
      "text": "`redis.lookup` lookups are always batched and executed through a single Redis pipeline per batch. The processor flushes a batch when either the size or the timeout limit is reached. The defaults are sensible for most pipelines; add the `batch:` block only when you need to override them. **Flink processor only.**\n\n**Properties**\n\n| Name           | Type      | Description                                                                              | Required | Default |\n| -------------- | --------- | ---------------------------------------------------------------------------------------- | -------- | ------- |\n| **size**       | `integer` | Maximum number of lookups in a single batch. Must be positive.                           | no       | `200`   |\n| **timeout_ms** | `integer` | Maximum time in milliseconds to wait before flushing a non-full batch. Must be positive. | no       | `100`   |\n\n**Additional Properties:** not allowed\n**Example**\n\nRead a hash field:\n\n[code example]"
    },
    {
      "id": "args",
      "title": "args\\[\\]: Redis command arguments",
      "role": "content",
      "text": "The list of expressions that produce arguments."
    }
  ],
  "examples": [
    {
      "id": "batch-ex0",
      "language": "yaml",
      "code": "source:\n  table: album\ntransform:\n  - uses: redis.lookup\n    with:\n      connection: target\n      cmd: HGET\n      args:\n        - concat(['artist:artistid:', artistid])\n        - \"`name`\"\n      language: jmespath\n      field: artist\noutput:\n  - uses: redis.write\n    with:\n      connection: target\n      data_type: hash\n      key:\n        expression: concat(['album:albumid:', albumid])\n        language: jmespath",
      "section_id": "batch"
    }
  ]
}
