content/integrate/redis-data-integration/reference/data-transformation/add_field.md
Add fields to a record
Option 1 (alternative): Add multiple fields
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| fields | object[] | Fields | |
| yes |
Additional Properties: not allowed
Example
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
| Name | Type | Description | Required |
|---|---|---|---|
| field | string | Field |
| yes |
| expression | string | Expression
| yes |
| language | string | Language
Enum: "jmespath", "sql"
| yes |
Additional Properties: not allowed
Example
source:
schema: dbo
table: emp
transform:
- uses: add_field
with:
field: country
language: sql
expression: country_code || ' - ' || UPPER(country_name)
<a name="option1fields"></a>
Fields
Items
Item Properties
| Name | Type | Description | Required |
|---|---|---|---|
| field | string | Field |
| yes |
| expression | string | Expression
| yes |
| language | string | Language
Enum: "jmespath", "sql"
| yes |
Item Additional Properties: not allowed
Example
- {}