Specifying sort keys

You can define sort keys on each of the input and output data sets of an operator.

Setting sort information directs InfoSphere® DataStage® to insert sort components in a data flow so that your sorting requirements are met. InfoSphere DataStage records this information for data sets that have the preserve partitioning option set.

Set and get sort keys for an input data set

To set and get sort keys for an input data set, call these APT_Operator functions:
APT_Operator::setInputSortKeys(APT_PropertyList keys, int input)
APT_PropertyList APT_Operator::getInputSortKeys(int input)

Set and get sort keys for an output data set

To set and get sort keys for an output data set, call these APT_Operator functions:
APT_Operator::setOutputSortKeys(APT_PropertyList keys, int output)
APT_PropertyList APT_Operator::getOutputSortKeys(int output)
Note: An operator that calls setPartitionMethod() on a data set can call setInputSortKeys() and setOutputSortKeys(), but cannot call setInputPartitioningStyle() and setInputPartitioningKeys() on an input data set, or setOutputPartitioningStyle() and setOutputPartitioningKeys() on an output data set.

Disable sort insertion

To disable sort insertion, add the global option -nosortinsertion to your osh command line, or specify the environment variable APT_NO_SORT_INSERTION.