I have a very regular use case on my data, which is to split rows considering the value on specific column(s).
Am using one of the row splitter nodeq, but these oneq allow to split only in two sub data sets.
Am wondering if there is a possibility to split data set in as much as needed sub data set considering each unique value (or combination if several columns).
To be concrete.
If I have a table with the columns “city” in which i have 1000 rows for “Paris”, 2000 for “Berlin” and one for “New York”, then to have automatically (or manually added) three output ports, the first with 1000 row for Paris, the second 2000 rows for Berlin and the third one row for New York".
This kind of node will avoid to have successive “Row splitter” or “Row filter”, one for each specific value of given column.
Hi @pierrel, I totally get where you’re coming from with this, and it would be great to have a splitter with the ability to dynamically add output ports rather than chaining row splitters.
A similar discussion has been had a while ago resulting in a component that attempts to in someway fill the “gap in the market”.
See this post:
Unfortunately components don’t have the ability to allow dynamically adding output ports at design time, so I created a component with 10 row-filter output ports (0 to 9), where you specify the regex pattern to match each, plus an additional 11th port for chaining to the next copy of the component where you have more than 10 patterns, so it can further filter “uncaught rows”.
It also has a a view that tells you how many rows are caught by each filter pattern. In the demo screenshot below, you can see that my config has caught a number of different cities, but I can easily see on the view output that there is an uncaught row, so I can go look at the 11th output (port 10) and quickly see what I’ve missed
This component is great to minimize the number of nodes in workflow.
Am not so comfortable with regex, that i don’t know which pattern I have to give in order to split each different string value from the given column in each output port.
I will continue with cascade of “Row splitter”, but keep in mind your component in case I have to big cascade!