With a split, a data source or a data table can be split into several tables by rules. To be able to explain a split better a small example:
The following data is in an Excel table that is to be split into two tables separated by categories:
Id | Name | Color |
---|---|---|
1 | Shoes | Brown |
2 | shirt | green |
3 | shirt | red |
4 | shoes | black |
5 | hat | brown |
1. create split
A flow has already been created and the Excel table has been created as data source with the name ‘Main Table’.
Now from the graphical flow editor, the ‘Split’ operation is dragged and dropped onto the editor surface and connected to the data source.
2. configure split
Once entered, the configuration for the split will appear. The following items can be configured:
- ‘Split/Rules tab’ - switch between basic settings and split rules.
- split name - the name of the split.
-
Default Label
Creates a split for records that were not covered by other rules. -
Mutual Exclusion
If set, a record will only be output for the first rule that applies. If not set, multiple rules can apply to a record and it will be output multiple times.
Note that if the ‘Mutual exclusion’ option is enabled, the order of the rules is important. Only the first rule corresponding to a row is considered. The order is (consistent across Chioro) from top to bottom.
Rules for the example
To create rules, Chioro expressionsare used, which return a True or False as a result.
For each rule created, a split is created. The data drawn from it can then be exported to a data destination or further manipulated. or further manipulated.
-
Overview window of the created rules
- switch between the individual rules. -
Tools
- Here you can create new rules, change their order, delete or copy them. - rule editor - rules are written here with the help of Chioro expressions.
-
Result preview
- The color labels assign each line to a rule, or to the “default” branch.
3. result
Table shoes
Id | Name | Color |
---|---|---|
1 | Shoes | Brown |
4 | Shoes | Black |
Table Shirt
Id | Name | Color |
---|---|---|
2 | shirt | green |
3 | shirt | red |
Table ELSE
Id | Name | Color |
---|---|---|
5 | hat | brown |