understanding LastRowInGroup()
Posted: Sat Jan 05, 2013 7:20 am
Below is taken from help window of Datastage
If the data is sorted on multiple columns and LastRowInGroup() is applied to secondary sort column how will transfomer know which is the primary sort column unless specified as an argument as to what is the sort hierarchy of columns ?
Thanks
If the argument specified is the secondary or other sorted key, then LastRowInGroup() returns TRUE if the value of the specified column is about to change, or if any of its higher level of key columns are about to change. For example, if the primary sorted column is Col1 and the secondary sorted column is Col2, then LastRowInGroup(Col2) returns true when either the value in Col2 is about to change, or the value in Col1 is about to change. Therefore it can return true when Col2 is not about to change, but Col1 is, because Col1 is a higher level sorted key than Col2.
If the data is sorted on multiple columns and LastRowInGroup() is applied to secondary sort column how will transfomer know which is the primary sort column unless specified as an argument as to what is the sort hierarchy of columns ?
Thanks