05-26-2016 11:54 AM
So, using DI Studio I can group columns and create a count(*) coulmn that captures the number in that group, but is there a way to locate the first record in that group?
I want to find the first time one of the duplicates appears, because I want to keep that one and close out the rest on a fact table.
I was thinking if I could have a column that had each observation within the group numbered I could simply look for the '1' in this column. Or if I could find another way to flag one record within the group, that'd be great.
Seems like a simple thing to do.
05-26-2016 01:17 PM
I'm not sure how you would apply this logic into a job/flow, and how would the Table Loader step work...?
Nevertheless, I don't think that a standard transformation could do this in one step.
If your data is sorted, a User Written code with if first.your_group then counter+1; would do the trick.
05-26-2016 02:01 PM - edited 05-26-2016 02:02 PM
Fortunately, I don't need this in a Table Loader step, but for the time being just for some analysis. I was thinking I could do it in an Extract, but maybe I would need to use a User Written piece, and sort the code first.
I'm a SAS beginner, so could you flesh out your suggestion just a bit more?
05-26-2016 02:10 PM
05-26-2016 03:30 PM