Skip to content

Data Pivot

Data Pivot changes the shape of your data between two common formats:

  • A record with several fields, such as a customer’s details: name, city, phone.
  • A list of rows with two columns, one with the field name and one with its value.

It helps when a destination, such as a spreadsheet or a report table, expects rows and what you have is a record, or the other way round.

When to use it

  • Write an order’s details into a spreadsheet as a two-column table, “Field” and “Value”.
  • Show a customer’s details one below the other in a report.
  • Read a sheet of field-value pairs and turn it into a record another component can use.
  • Prepare data extracted from a document so it can be reviewed line by line.

Configuration

FieldWhat it does
Transform ModeThe conversion: Objet to List turns a record into rows; List to Object joins rows into a record. Default: Objet to List.
DataThe data you want to convert: a record for Objet to List, or a list of rows for List to Object.
Key Column NameThe name of the column that holds each field’s name. Default: COLUMN1. In List to Object, the component looks for the column with this name in each row.
Value Column NameThe name of the column that holds each field’s value. Default: COLUMN2.
Format LabelsOnly for Objet to List. How field names are written: Keep Original, as they are; Replace Underscores with Spaces, which swaps underscores for spaces (start_date becomes start date); Title Case, which also capitalises the first letter of each word (Start Date). Default: Keep Original.

Advanced options

Only shown for Objet to List.

FieldWhat it does
Include Header RowAdds a first row with the names of the two columns. Off by default.
Wrap List in ObjectReturns the rows inside a record, in the data_list field, instead of as a plain list. On by default.

In the Batch Mode tab you can connect a list to Batch Input to convert several records at once. See Batch Mode.

Output

The Output output returns:

  • For Objet to List, one row per field of the record, with the two columns you set. If a value is itself a list or a record, it is written as text in a single cell. With Wrap List in Object on, the rows come inside the data_list field.
  • For List to Object, a single record with one field per row.

Example

A support team stores each incident’s details in a Google sheet, in a two-column layout.

  1. Connect the incident’s record to Data, with fields such as customer, start_date and priority.
  2. Leave Transform Mode as Objet to List.
  3. Enter Field in Key Column Name and Value in Value Column Name.
  4. In Format Labels, choose Title Case so the fields read Customer, Start Date and Priority.
  5. Connect Output to the component that writes to the spreadsheet.