Pivot data from deep to long

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

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

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

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,

Deep to Long.knwf (82.1 KB)


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.