TEST_DATA.xlsx (9.7 KB)
I have attached a file with sample data set. The primary keys will be Plan Number and SSN.
I have to loop thru a dataset which might contain either 2 records (11,2) or 3 records (11,2,61) for each Plan and SSN combination. I was able to use Groop Loop start and get the dataset as required.
The Requirement is record 11 can have 3 record types “N” (NewHire), “H” (Rehire) or “T” Terminated. Based on Record type N, H or T, I have to perform a set of operations for the 2 or 3 record set in the group.
I am able to Fetch the set of records for a SSN and plan in Group Loop.
I have to find out the record type for 11 and based on that apply a set of business rules for each of these records. How do i do this.
I tried using rule based rule engine with rule:
Record identifier =11 and Record Type =“N” => TRUE
The it only gets record 11.
I need the set 11,2 and 61 if exists and apply set of Business rules based on Record Type for 11.
can someone please help
See this wf group_loop.knwf (44.1 KB). I hope I understood your question correctly. This wf will add the value of “Record Type” for Record Identifier = 11 to all rows if the combination of Record Identifiers in the Loop = 2-11-61.
Thank you very much for the quick response. Let me download and try the solution. Thank you for taking time to help.
The workflow works and that is what I am looking for. Can you please help me with a small change in the output. The output scree shot is attached. It only applied this logic for one set 2,11,61.
can this result column get the record type of 11 where it is “nothing” even when it only has 2-11
Thank you very much Hans, this helped me a lot. I was able to get the desired output
Hi @chaithuj , in that case, you should flag @HansS 's post (Knime help in Group Loop - #2 by HansS) as the Solution instead of your post
sure, will do it.
I didn’t know the process
Hi Hans, related to same workflow I am stuck again. after the Loop ends, I am starting a group loop again to fetch each data set (ssn, plan, result) and trying to perform validation steps.
The validations are like below:
New Hire, with FPRS Shell, no rec 61|
|Newhire with fprs shell, 61 record exists|
Newhire without fprs shell, 61 record does not exist|
Newhire without fprs shell, 61 record exists|
Rehire without fprs shell, 61 record exists(SSN not present in historic DB)|
Rehire without fprs shell, 61 record does not exist(SSN not present in historic DB)|
Rehire with fprs shell, record 61 exists(No check in Historic DB)|
Rehire with fprs shell, record 61 does not exist(No check in Historic DB)|
Rehire without fprs shell, 61 record exists (SSN present in Historic DB)|
Rehire without fprs shell, record 61 does not exist(SSN present in Historic DB)|
No Show - termination no shell|No show without fprs shell, record 61 exists|
No Show - termination no shell|No show without fprs shell, record 61 does exist|
and many more misc scenarios.
For each of ths scenario it updates the records read from the file and creates a new output record.
So i tried to concat all outputs using concatenate node and the to the end of the concat node wher ei get the results, i added loop end.
When i restrict the the data by passing one dataset and testing individual piece it works and created output. when i am trying to run the complete workflow it fails. How can i amke this work.
testing scenarios 4-18_KnimeHub.txt (19.2 KB)
RBS_Sample.knwf (637.4 KB)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.