Skip to main content
Pentaho Documentation

Row Flattener

Parent article

The Row flattener step allows you to flatten sequentially provided data. Use this step when you have a file organized in consecutive rows where each row is an attribute, and you want to structure those rows of data into columns.

General

Row flattener

Enter the following information in the fields of this transformation step.

FieldDefinition
Step nameSpecify the unique name of the Row flattener step on the canvas. You can customize the name or leave it as the default.
The field to flattenSpecify the name of the field to be flattened.
Target fieldSpecify the names of the target fields that the data will be flattened to.

Example

Suppose your file contains company order information and has one attribute per row as shown below. In the file, each order is described in three rows: one row for the name of the company, one for the country, and one for the order number:

Land of Toys Inc.
United States
10107
Lyon Souvenirs 
France
10134
Australian Gift Network, Co
Australia
10374
Gift Depot Inc.

Using the following entries in the Row flattener step, the rows are flattened into three target fields:

Row flattener entry example

The resulting data set is shown below. For every three rows, the data is now formatted into a single row.

Results example for Row flattner

NoteIncomplete or non-consecutive data can lead to unexpected results.