This pipeline will return the maximum value for each unique group in column ‘A’
-> group(
by: A,
select: {max: {A, max(B)}}
)
-> save(name: 'output')
so
A,B
a,1
a,4
g,3
g,2
will return
max.A,max.max_B
a,4
g,3
I would like to get the maximum value in column ‘B’ but removing the group function
input(relation: 'test.csv')
-> select({max(B)})
-> save(name: 'output')
gives the error
Failed to validate model for execution
- Failed to validate 'select({max(B)})' step for execution
- Failed to validate expression '{max(B)}' against input type {A=>Text, B=>Text}
- Problems found with 'max' riskscape function
- Wrong number of arguments provided. Expected 2, but got 1
How can I use max with a column of data outside of a group function?