Extracts the value from a column that is a specified number of rows after the current value. |
The row from which to extract a value is determined by the order in which the rows are organized at the time that the transform is executed. If you are working on a randomly generated sample of your dataset, the values that you see for this function might not correspond to the values that are generated on the full dataset during job execution.
group
and order
parameters to define the groups of records and the order of those records to which this transform is applied.window value:NEXT(myNumber, 1) order:Date |
Output: Generates the new column, which contains the value in the row in the myNumber
column immediately after the current row when the dataset is ordered by Date
.
window value:NEXT(col_ref, k_integer) order: order_col [group: group_col] |
Argument | Required? | Data Type | Description |
---|---|---|---|
col_ref | Y | string | Name of column whose values are applied to the function |
k_integer | Y | integer (positive) | Number of rows after the current one from which to extract the value |
For more information on the order
and group
parameters, see Window Transform.
Name of the column whose values are used to extract the value that is k-integer
values after the current one.
Required? | Data Type | Example Value |
---|---|---|
Yes | String (column reference) | myColumn |
Integer representing the number of rows after the current one from which to extract the value.
k=1
represents the immediately following row value.group
parameter is applied, then this parameter should be no more than the maximum number of rows in the groups.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer | 4 |