Question

Splitting single input into multiple outputs for processing (Not fanout)


Is there a way to take a table as input and split it out into multiple outputs based on the value of an attribute (that I may not know)?

I have a table of data that refreshes daily and one of the columns is for an object value. Most of the features (non-spatial) will have the same value for this field but people do have the option to set it to a different value that would be specific to them. Depending on the person adding data, the value could be different from one day to the next.

Is there a transformer that will split a table out based on the value of a single field and then let me do different processing for each output? I've looked around and saw a few mentions of a "Fanout" but that looks to be something that happens on the writer and that's usually geospatial. I'm looking for something more like this:

I see that there is an "AttributeFilter" transformer but it seems like I need to know what the values are that I would need to split by in advance. In my case, the values are all generated from the product serial and user ID so there could potentially be thousands of different values but only ever a maximum of 20 values per day and I wouldn't know what those are ahead of time.

This workflow would run every night and just needs to filter them out based on that value and then perform a function on each classification.


6 replies

After reading the docs, it looks like I was on the right track. I was able to get what I needed by importing from the data source to get the list of attributes. Is there a way now to get that list to refresh every time I run the workbench?

Badge +22

Could you not just use a group-by on the object field when processing?

Could you not just use a group-by on the object field when processing?

I thought about that but I don't see a "Group By" option on every transformer. Is there a transformer that can group them like that before it hands off to others for processing?

Badge +22

I thought about that but I don't see a "Group By" option on every transformer. Is there a transformer that can group them like that before it hands off to others for processing?

Not every transformer will need a group-by. It's only relevant on transformers that perform inter-feature operations.

 

 

For example a BoundingBoxAccumulator creates a minimum spanning box around a set of features. If you don't set a group by, it will produce a bounding box of all features, alternatively you could create bounding boxes for each group of features that share a common value.

 

 

The BoundingBoxReplacer produces a bounding box around each feature. It doesn't have a group-by because it's irrelevant.

 

 

Likewise the Aggregator has a group-by, but the Deaggregator does not.
Badge +2

If your values are dynamic then you can use InlineQuerier too.

I have attached sample workbench for reference

If your values are dynamic then you can use InlineQuerier too.

I have attached sample workbench for reference

Hi @pratap​! Is this sample workbench still available? I'm adapting a similar problem and it would be interesting to see your solution :-)

Reply