Skip to main content

Capture

One option (there are a few) would be to start with a Creator and sent the Number to Create to 25. This will give you 25 features with an attribute '_creation_instance' from 0-24. Then pass it to an attributemanager and configure it so you rename '_creation_instance' to 'BusinessRuleID' (optional) and add one to the value and add a new attribute called 'Count'Screenshot 2020-10-01 150329

 

Then connect this to an featuremerger through the supplier port and connect your existing data to the requester port. Set the join on to BusinessRuleID (or _creation_instance for the supplier) for both. Make sure 'conflict resolution' is set to 'use requester'

 

Screenshot 2020-10-01 150739


One option (there are a few) would be to start with a Creator and sent the Number to Create to 25. This will give you 25 features with an attribute '_creation_instance' from 0-24. Then pass it to an attributemanager and configure it so you rename '_creation_instance' to 'BusinessRuleID' (optional) and add one to the value and add a new attribute called 'Count'Screenshot 2020-10-01 150329

 

Then connect this to an featuremerger through the supplier port and connect your existing data to the requester port. Set the join on to BusinessRuleID (or _creation_instance for the supplier) for both. Make sure 'conflict resolution' is set to 'use requester'

 

Screenshot 2020-10-01 150739

There is no way to add the missing ones using a python caller for example?


Hi @katt​ 

It is definitely possible to do this using Python in the PythonCaller. For example, you can use this logic in the PythonCaller to create the output that you want.

 

However, it is generally recommended only use Python if there are no suitable transformers for the task. As @hkingsbury​ mentioned, there are a few workflows which can create the output wanted. For example, attached is a workspace which has two different methods to add the missing features.

 

Is there a reason why you want to use Python?


There is no way to add the missing ones using a python caller for example?

Is there a reason you want to use a pythoncaller?

Creating 25 records with a count of 0 numbered 1 through 25 and then aggregating by business rule and summing the count will get the result you want

Capture


Reply