Hi, I am quite new to Knime, so I am hoping that someone more expericence will be able to help me with this problem.
I have a table with various columns, 4 of which are person, activity, start date and end date.
I would like to be able to create new rows based on the difference between start date and end date. I understand about de-pivoting, but my problem is how to create the additional dates in a range as values in the column.
Example:
Person /Activity/Start_Date/End_Date
John/Activity1/2017-01-01/2017-01-03
Desired outcome
Person/Activity/Date
John/Activity1/2017-01-01
John/Activity1/2017-01-02
John/Activity1/2017-01-03
I hope this makes sense and thanks in advance for any help with this.
Thank you for your reply and apologies but I have only just seen it. I will t be interested to try this out, as in the meantime, I used a java snippet node (with some help!), which worked.
I did get as far as your steps 1 and 2 before I asked the question, but then got stuck!
Maybe I can help with this matter. I have done it using Create Date&Time Range which is controlled with flow variables produced by Table Row to Variable Loop Start node.
The idea is same pretty much. In both Java and Python you need to find function that creates date range based on your start and end date followed by a bit of data manipulation to get desired output…
Why do you want to use Java or Python and not KNIME nodes?