Hello all,
is possible to make operation in Java Snipper, which returns value based on value in previous row and in the same or another column?
UseCase:
I have table with Customer_ID, Order_id and Order_date columns and I want to fill Order_of_orders according to order of orders scpecific for each customer.
Example of table:
Customer_ID | Order_id | Order_date | Order_of_orders |
---|---|---|---|
1 | 1004 | 01/06/2016 | 1 |
2 | 1001 | 01/01/2016 | 1 |
2 | 1006 | 01/10/2016 | 2 |
2 | 1007 | 01/11/2016 | 3 |
3 | 1003 | 01/06/2016 | 1 |
4 | 1002 | 01/04/2016 | 1 |
4 | 1005 | 01/10/2016 | 2 |
I know how to logically solve this as I already did in other ETL tool with has Java sripting node, but I can´t find proper syntax for KNIME Java Snippet node.
Thanks you very much for any help:)