5.6.12

Creating row and record index

Google Refine provide the row index as information in the third column. Unfortunately GREL expression cannot call value in this column, you need to use one of the following expression to generate the value.



Row index

Select any column and add a column based on this column with the following expression:
rowIndex+1

You need to add 1 to your result as the first row is 0.
This will create a new column with the row index so you can use it is other expression.

Record index

To get the the index of a record use:
row.record.index

The index of a row within a record

Once you have created a record select any column and add a column based on this column with the following expression:
row.index - row.record.fromRowIndex+1