Reshape Data

View as Markdown

Data rarely arrives in exactly the shape the next step wants. Maybe you need to combine two fields, rename a key, or turn a list of raw records into a clean list of just the fields you care about. Which node you reach for depends on whether you are working with one thing or a list.

Which node to use

  • Use Data Transform when you are shaping a single value or a single object, such as building one clean record out of a few fields.
  • Use Map when you are reshaping every item in a list, turning a list of raw rows into a list of tidy ones.

The simplest way to remember it: one thing means Data Transform, a list means Map.

How to build it

1

Shape a single value

Add a Data Transform step and write an expression that produces the shape you want. For example, combining a first and last name into one field:

first_name + " " + last_name
2

Reshape a whole list

Add a Map step, point it at the list, and describe the shape each item should take. Map applies that shape to every item and hands back the new list, ready for a loop or a bulk step.