Returns list of all values in a column for rows that match a specified condition. |
NOTE: When added to a transform, this function is applied to the current sample. If you change your sample or run the job, the computed values for this function are updated. Transforms that change the number of rows in subsequent recipe steps do not affect the values computed for this step. |
To perform a simple extraction of values without conditionals, use the LIST function. See LIST Function.
pivot value: LISTIF(hotChocolateLiters, 500, temperature < 0) group:date limit:1 |
Output: Generates a two-column table containing the unique values for date
and the values from the hotChocolateLiters
column for each date
when the temperature
value is less than 0. Maximum number of values is 500. The limit
parameter defines the maximum number of output columns.
pivot value:LISTIF(col_ref, limit, test_expression) [group:group_col_ref] [limit:limit_count] |
Argument | Required? | Data Type | Description |
---|---|---|---|
col_ref | Y | string | Reference to the column you wish to evaluate. |
limit_int | N | integer | Maximum number of values to extract into the list array. From 1 to 1000 . |
test_expression | Y | string | Expression that is evaluated. Must resolve to true or false |
For more information on the group
and limit
parameters, see Pivot Transform.
Name of the column whose values you wish to use in the calculation. Column must be a numeric (Integer or Decimal) type.
Required? | Data Type | Example Value |
---|---|---|
Yes | String that corresponds to the name of the column | myValues |
Non-negative integer that defines the maximum number of values to extract into the list array.
NOTE: If specified, this value must between 1 and 1000, inclusive. |
NOTE: Do not use the limiting argument in a |
This parameter contains the expression to evaluate. This expression must resolve to a Boolean (true
or false
) value.
Required? | Data Type | Example Value |
---|---|---|
Yes | String expression that evaluates to true or false | (LastName == 'Mouse' && FirstName == 'Mickey')
|