Back to Redis

Add Field

content/integrate/redis-data-integration/reference/data-transformation/add_field.md

latest2.0 KB
Original Source

Add fields to a record

Option 1 (alternative): Add multiple fields

Properties

NameTypeDescriptionRequired
fieldsobject[]Fields
yes

Additional Properties: not allowed

Example

yaml
source:
  schema: dbo
  table: emp
transform:
  - uses: add_field
    with:
      fields:
        - field: name.full_name
          language: jmespath
          expression: concat([name.fname, ' ', name.lname])
        - field: name.fname_upper
          language: jmespath
          expression: upper(name.fname)

Option 2 (alternative): Add one field

Properties

NameTypeDescriptionRequired
fieldstringField
                                | yes      |

| expression | string | Expression | yes | | language | string | Language Enum: "jmespath", "sql" | yes |

Additional Properties: not allowed

Example

yaml
source:
  schema: dbo
  table: emp
transform:
  - uses: add_field
    with:
      field: country
      language: sql
      expression: country_code || ' - ' || UPPER(country_name)

<a name="option1fields"></a>

Option 1: fields[]: array

Fields

Items

Item Properties

NameTypeDescriptionRequired
fieldstringField
                                | yes      |

| expression | string | Expression | yes | | language | string | Language Enum: "jmespath", "sql" | yes |

Item Additional Properties: not allowed

Example

yaml
- {}