Hi everyone,
I load the classification rules from a google sheet before they are put through an R snippet which formats them in the PMML style.Since I use the PMML rules dictionary node on the ‘First hit’ setting order is important .
I was hoping to know whether there was a ‘row sorter’ node that allows me to sort the rows according to two conditions.
Previously, I handled the sorting with the below SQL query:
SELECT *
FROM [dbo].[rules]
ORDER BY (CASE WHEN
[col.1] = ‘A’
OR [col.1] = ‘B’
OR [col.1] = ‘C’
THEN 1
WHEN
[col.1] = ‘D’
OR [col.1] = ‘E’
OR [col.1] = ‘F’
THEN 2
WHEN
[col.1] = ‘G’
OR [col.1] = ‘H’
OR [col.1] = ‘I’
THEN 3
END) asc, [col.date] desc
this query uses my custom defined hierarchy (the case statement) and the rows date ([col.date]) to do the sorting. It would apply the hierarchy first before the date, I was wondering whether there was a specific node I could use to accomplish this
Thanks,
Luca