Page 1 of 1

Create keychange column vs create cluster keychange column

Posted: Mon Nov 21, 2011 3:26 am
by pandeesh
Can anyone explain the difference between the options Create keychange column and create cluster keychange column in sort stage?

thanks

Posted: Mon Nov 21, 2011 7:10 am
by chulett
Check the Parallel Job Developer's Guide pdf. Documented in the section on the Sort stage oddly enough, page 274 in the 8.5 version I have.

Posted: Mon Nov 21, 2011 7:15 am
by pandeesh
Thanks Craig!! I have checked he documentation ,
But I don't see any differences between those in the documentation.
Only the column names are changing .
Thanks

Posted: Mon Nov 21, 2011 7:18 am
by chandra.shekhar@tcs.com
@chulett
I have checked in the pdf and was surprised to see that both defination are almost the same.

Create cluster key change column
This property appears for sort type DataStage and is optional. It is set False by default. If set True it tells the Sort stage to create the column clusterKeyChange in each output record. The clusterKeyChange column is set to 1 for the first record in each group where groups are defined by using a Sort Key Mode of Don't Sort (Previously Sorted) or Don't Sort (Previously Grouped). Subsequent records in the group have the clusterKeyChange column set to 0.

Create key change column
This property appears for sort type DataStage and is optional. It is set False by default. If set True it tells the Sort stage to create the column KeyChange in each output record. The KeyChange column is set to 1 for the first record in each group where the value of the sort key changes. Subsequent records in the group have the KeyChange column set to 0.

Posted: Mon Nov 21, 2011 7:27 am
by chulett
Right, almost... and the difference between the two is the key here. :wink:

Posted: Mon Nov 21, 2011 7:32 am
by pandeesh
Craig,
Could you please elaborate?

Posted: Mon Nov 21, 2011 7:41 am
by chulett
I've highlighted what seems to me to be the key difference in what chandra posted. One option is for use when the data is already sorted, the other when the stage does the sorting. Not sure why they felt a need to have two separate options but obviously they did.

Posted: Mon Nov 21, 2011 7:47 am
by pandeesh
Thanks Craig!!

Posted: Mon Nov 21, 2011 8:31 am
by chandra.shekhar@tcs.com
Thanx Craig :D