Page tree

Release 6.0.2


Contents:

   

Source:

You have imported the following racer data on heat times from a CSV file. When loaded in the Transformer page, it looks like the following:

(rowId)column2column3column4column5
1RacerHeat 1Heat 2Heat 3
2Racer X37.2238.2237.61
3Racer Y41.33DQ38.04
4Racer Z39.2739.0438.85

In the above, the (rowId) column references the row numbers displayed in the data grid; it is not part of the dataset. This information is available when you hover over the black dot on the left side of the screen.

Transform:

You have examined the best performance in each heat according to the sample. You then notice that the data contains headers, but you forget how it was originally sorted. The data now looks like the following:

(rowId)column2column3column4column5
1Racer Y41.33DQ38.04
2RacerHeat 1Heat 2Heat 3
3Racer X37.2238.2237.61
4Racer Z39.2739.0438.85

While you can undo your sort steps to return to the original sort order, this approach works best if you did not include other steps in between that are based on the sort order.

If you have steps that require retaining your sort steps, you can revert to the original sort order by adding this transform step:

NOTE: Source row information may be lost after operations such as joins, unions, and aggregations are performed. In these cases, you cannot sort by the source row information. You may be able to generate a column of source row number earlier in your recipe.

sort order:SOURCEROWNUMBER()

Then, you can create the header with the following simple step:

header sourcerownumber:1


Results:

After you have applied the last header transform, your data should look like the following:

(rowId)RacerHeat_1Heat_2Heat_3
3Racer Y41.33DQ38.04
2Racer X37.2238.2237.61
4Racer Z39.2739.0438.85

You can sort by the Racer column in ascending order to return to the original sort order.

This page has no comments.