As the title suggest, I'd like to keep the last edited record per route. I've tried the statistics calculator (group by: route number) but it seems to keep all the records with a new 'max' field . Any recommendations?
Hi @mariofederis,
Try using a Sorter transformer to sort by dates last edited, descending. Then use a Sampler transformer set to sample 1 feature, First N feature, grouped by the route number attribute. I was able to create a mock-up workspace, and for my very small sample data it worked well. Just make sure that the attribute that holds the last-edited-dates is recognized by FME as a datetime type so the Sorter knows what to do with it, I have that set in my reader. Here's a screenshot of my mockup workspace:
It may require some tweaking for your data, but hopefully it works out!
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.