Can anyone help me devise a method using FME to collapse a series of text records with no associate geometry, assuming that 2 values are equal and 2 values are contiguous. I have included some example data below, data is arrange such that the Animal and Colour values must match the preceding row and the preceding End value must match the Start value.
I have a very nasty script for excel which may be possibly be adapted, but I would really like to do this with FME.
I have tried to do some of this within a loop but got a bit lost. Could it be down using transformers or a Python script which can be included in a bench? Ideally any method needs to be adaptable as I would like to use it for other data sets with differing field names and more or less matches required.
Animal, Text
Colour, Text
Start, Int
End, Int
Input Data Format
Animal,Colour,Start,End
Dog,Blue,0,1
Dog,Blue,1,5
Dog,Blue,5,10
Dog,Red,31,35
Dog,Red,35,56
Cat,Purple,101,102
Cat,Purple,103,106
Cat,Purple,106,111
Required Output Data Format
Animal,Colour,Start,End
Dog,Blue,0,10
Dog,Red,31,56
Cat,Purple,101,102
Cat,Purple,103,111
Thanks in Advance,
Rob