Ordered CSV/MapPipe processing
I would like to be able to have an ordered list of replacement values in the bridge. The MapPipe supports regular expressions and it would help in cases such as:
- There is an hierarchical value that needs to be mapped
- The majority of mappings are at the top level, rather than leaf nodes
Say for example there is a team structure with Teams A, B, C and within each team, sub-teams 1-9.
- All of Team A gets the value A
- All of Team B gets the value B, except Team B sub-team 7 which gets B7
- All of Team C gets the value C
Having a mapping CSV like:
Team A|.*,A
Team B|Subteam7,B7
Team B|.*,B
Team C|,C
[[default]],U
Looks like it should work, but the 'Team B|.*' may be processed first, and so 'Team B|Subteam7' is assigned B, not B7.
Maybe a LinkedHashMap, instead or as well as a HashMapcould be implemented? While in the simple example above we could create 9 'Team B' rows, if the sub-team values are unknown that is not possible.
Comments
0 comments
Please sign in to leave a comment.