03-06-2018 04:07 AM
My task in DI Studio is to find first and last observations in a group after a sort transformation (and user written code is a no go) has been applied.
So far I stumbled over the option to use two sequential sorts, the first one creating the sort order and the second one keeping the first observation with the nodupkey option, discarting all others.
Also the rank transformation cann be used to create a rank order including the numeric rank variable. Keeping the rank 1 observation does the job as well. But it only functions if you sort numeric fields and does not help if you only sort alphanumeric values.
Is there a DI Studio in-house transformations/option in atransformation that lets me keep either first or last observations?
03-06-2018 07:29 AM
Not OOTB that I'm aware of.
But is this really a common task? I usually do the "twin Sort" transformation to achieve this, it's not that ugly.
I feel you when you want to avoid user written code, but if this is a common situation, writing a user written transformation is not that bad...