Skip to main content

I have a bunch records that I'm aggregating.
After this, I'm applying business rules and based on what's outputted, I'll know which of the original records I want to parse differently (i.e. not through aggregation, business rules set #2). I want to go back to the
beginning of the workspace to allow these
specific records to pass through in its original format. How do I do
that?

I'm thinking of aggregating the unique ids of the records I want, and use this value to test against the original records, like: ID in @Value(aggr_ids_to_keep), but then the record that has the aggr_ids_to_keep attribute will be its own record.

Here's another way to look at what I mean. The recordset would be like {0:n,m} where 0:n are the original records and m is the one with aggr_ids_to_keep. In this scenario, how do I get m to compare against 0:n?


Hi @lottegis, if the requirement is to get records that don't match the business rules, a possible way is to merge the records that matched the business rules to the original records, with a FeatureMerger.

Send all the original records to the Requestor port, send the records that matched the business rules to the Supplier port, set ID to the Join On parameter for both Requestor and Supplier, and run. The records that don't match the business rules will be output via the UnmergedRequestor port.

Assuming that the original records have unique ID and also it will be preserved after applying the business rules.


Hi @lottegis, if the requirement is to get records that don't match the business rules, a possible way is to merge the records that matched the business rules to the original records, with a FeatureMerger.

Send all the original records to the Requestor port, send the records that matched the business rules to the Supplier port, set ID to the Join On parameter for both Requestor and Supplier, and run. The records that don't match the business rules will be output via the UnmergedRequestor port.

Assuming that the original records have unique ID and also it will be preserved after applying the business rules.

Alternatively, if you have already created a single feature containing 'aggr_ids_to_keep' that stores comma-separated IDs, you can merge it to all the original records unconditionally with a FeatureMerger (set the same constant value e.g. 1 to the Join On) and then filter the resulting records with a Tester (using the In operator).

 

 


Hi @lottegis, if the requirement is to get records that don't match the business rules, a possible way is to merge the records that matched the business rules to the original records, with a FeatureMerger.

Send all the original records to the Requestor port, send the records that matched the business rules to the Supplier port, set ID to the Join On parameter for both Requestor and Supplier, and run. The records that don't match the business rules will be output via the UnmergedRequestor port.

Assuming that the original records have unique ID and also it will be preserved after applying the business rules.

Using FeatureMerger to join on ID worked! Thank you.

 

 


Reply