HTML file with group and detail data to parse and loop through

I have a HTML file with the list of users and their group as follows:

Row 1: GroupID GroupName GroupDescription
Row 2: UserID UserName2
Row 3: UserID UserName3
Row 4: UserID UserName4
Row 5: UserID UserName5
Row 1: GroupID GroupName GroupDescription2
Row 2: UserID UserName6
Row 3: UserID UserName7
Row 4: UserID UserName8
Row 5: UserID UserName9

Group row and User row no formal data structure. No fixed length.
How do I loop through this data file and create the output file as follows:
GroupID1 GroupName Group Desc UserID UserName1
GroupID1 GroupName Group Desc UserID UserName2
GroupID1 GroupName Group Desc UserID UserName3
GroupID2 GroupName Group Desc UserID UserName4
GroupID2 GroupName Group Desc UserID UserName5
GroupID2 GroupName Group Desc UserID UserName6

I am trying with column splitter options and basic/variable based/table based loops and none seems working.
If you had encountered Mainframe Vanguard reports, you should be familiar with the above report outputs.
Thank you in advance.

Hi @rbvasu,

Welcome to the KNIME Community :slight_smile:

I’m trying to understand the transformation you are trying to perform, but I’m not sure yet.

Do I understand it correctly that you have one table where the value Row 1 occurs multiple times in the first column and that you want to add the values of these rows to the all the rows below, until the next time the value Row 1 is in the first column occurs?



Yes, that’s correct. The Mainframe Vanguard report comes out like master/detail or group/detail format.
I need to reverse engineer to place the master/group value for each detail record.
I tried rule engine and loop options but still no resolution yet.
Thank you

Hi @rbvasu,

thanks for clarifying!

I created a little example workflow for you: Transform Vanguard Report – KNIME Hub

Please have a look at it and let me know in case you have any questions.

The main idea is to first create a column that has the information how many users you have per group. Next the rows with the group information are replicated based on this information and then added to the user info.



@Kathrin Thank you so much. As I was using version 4.2.2, some of the nodes were not available.
So I downloaded your workflow and updated new extensions.
I will recreate my workflow using the new nodes and see if I can able to achieve the desired results.
Thank you again.

1 Like

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