{
  "id": "add_field",
  "title": "add_field",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/add_field/",
  "summary": "Add fields to a record",
  "tags": [
    "docs",
    "integrate",
    "rs",
    "rdi"
  ],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "page_type": "content",
  "content_hash": "df9d9671258b030baae0231405c2ce8d68466c2bea5dfee7e73f2e4ef0e5f62b",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Add fields to a record\n\n**Option 1 (alternative):**\nAdd multiple fields\n\n**Properties**\n\n| Name                         | Type       | Description | Required |\n| ---------------------------- | ---------- | ----------- | -------- |\n| [**fields**](#option1fields) | `object[]` | Fields<br/> | yes      |\n\n**Additional Properties:** not allowed\n\n**Example**\n\n[code example]\n\n**Option 2 (alternative):**\nAdd one field\n\n**Properties**\n\n| Name           | Type     | Description                                   | Required |\n| -------------- | -------- | --------------------------------------------- | -------- |\n| **field**      | `string` | Field<br/>                                    | yes      |\n| **expression** | `string` | Expression<br/>                               | yes      |\n| **language**   | `string` | Language<br/>Enum: `\"jmespath\"`, `\"sql\"`<br/> | yes      |\n\n**Additional Properties:** not allowed\n\n**Example**\n\n[code example]\n\n<a name=\"option1fields\"></a>"
    },
    {
      "id": "option-1-fields-array",
      "title": "Option 1: fields\\[\\]: array",
      "role": "parameters",
      "text": "Fields\n\n**Items**\n\n**Item Properties**\n\n| Name           | Type     | Description                                   | Required |\n| -------------- | -------- | --------------------------------------------- | -------- |\n| **field**      | `string` | Field<br/>                                    | yes      |\n| **expression** | `string` | Expression<br/>                               | yes      |\n| **language**   | `string` | Language<br/>Enum: `\"jmespath\"`, `\"sql\"`<br/> | yes      |\n\n**Item Additional Properties:** not allowed\n\n**Example**\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "yaml",
      "code": "source:\n  schema: dbo\n  table: emp\ntransform:\n  - uses: add_field\n    with:\n      fields:\n        - field: name.full_name\n          language: jmespath\n          expression: concat([name.fname, ' ', name.lname])\n        - field: name.fname_upper\n          language: jmespath\n          expression: upper(name.fname)",
      "section_id": "overview"
    },
    {
      "id": "overview-ex1",
      "language": "yaml",
      "code": "source:\n  schema: dbo\n  table: emp\ntransform:\n  - uses: add_field\n    with:\n      field: country\n      language: sql\n      expression: country_code || ' - ' || UPPER(country_name)",
      "section_id": "overview"
    },
    {
      "id": "option-1-fields-array-ex0",
      "language": "yaml",
      "code": "- {}",
      "section_id": "option-1-fields-array"
    }
  ]
}
