Pivot data from deep to long

Hi,
I am new Knime.
I have unique requirement to prepare data (messy database table) to identify unique workflow routes our applications have taken before it is finalized for optimization.
for data looks like
|Application#|Status|Date|
|App1|00|01/01/2024|
|App1|10|01/02/2024|
|App1|10|01/03/2024|
|App1|20|01/04/2024|
|App1|10|01/05/2024|
|App1|30|01/06/2024|
|App1|100|01/07/2024|
|App2|00|01/01/2024|
|App1|10|01/02/2024|
|App1|20|01/04/2024|
|App1|20|01/05/2024|
|App1|30|01/06/2024|
|App1|100|01/07/2024|

If the status remains same between 2 consecutive statuses, I need to count them as one record with max date between them.

I need the output to look like
|APP1|00-10-20-10-30-100|
|App2|00-10-20-30-100|

Any help appreciated.

Could you please post some sample data?

App_ID Status Created_Date
O20240001 00
O20240001 00 01/01/2024
O20240001 10 01/02/2024
O20240001 10 01/03/2024
O20240001 20 01/04/2024
O20240001 10 01/05/2024
O20240001 30 01/06/2024
O20240001 100 01/07/2024
I20240002 00 01/01/2024
I20240002 10 01/02/2024
I20240002 20 01/04/2024
I20240002 20 01/05/2024
I20240002 30 01/06/2024
I20240002 100 01/07/2024

Output needs to be

App_id workflow_route
O20240001 00-10-20-10-30-100
I20240002 00-10-20-30-100

Hi,
Welcome to the KNIME Forum. Thank you for the example data. I am not sure what the date has to do with it, as it is not included in your output, but the attached workflow produces what you need.
Kind regards,
Alexander

Deep to Long.knwf (82.1 KB)

2 Likes

Thank you so much Alexander. This solution works.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.