Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to figure out how to go about converting a file with the following format
ID building room time
A main 12 10:00
A main 38 12:30
A office 8 3:00
B main 10 9:00
B office 6 11:00
into
A
main 12 10:00
main 38 12:30
office 8 3:00
**********
B
main 10 9:00
office 6 11:00
**********
...
So I need to format this file with the id for each original row to be a 'leading' row, then display the next x number of rows for each id containing the schedule, and finally 10 asterisks as a row to separate the schedules of each id. The headers don't necessarily matter as they wont be included, but I need my data to be formatted in this way.
Any help would be appreciated.
Hi, I use tfixedflowinput to simulate your file, you can use a tfileinput delimited with the same separator,
then I the first char of each row (A,B etc..) and the rest of the string witth substring,
I sorted the row by Id with tSortRow
then i denormalize the values to make a string array of the values for (A,B etc...)
I use a tflow to iterate , to iterate on A,B,C etc
then i use a trow generator to reatribuate the values in the iterate link.
Then i normalize the second column to make one row for each values wich are group y (A,B,C etc....)
then i use tjavaflex to format the string as the output you want.
And I stock everything in a globalMap here out.
Send me love and Kudos