You can do this with adjacent attribute mapping. If you split r_name by the hyphen, you can then use a conditional statement to assess whether the end of the previous value matches the start of the current value. If there is a match, use the group id from the previous value, otherwise increment by 1
You can do this with adjacent attribute mapping. If you split r_name by the hyphen, you can then use a conditional statement to assess whether the end of the previous value matches the start of the current value. If there is a match, use the group id from the previous value, otherwise increment by 1
If you can't rely on order this is another approach using the excellent ListCombiner custom transformer. You would need to add 1 to the Group ID if you wanted group numbering to start from 1 instead of 0