Skip to main content

Reorder Attributes

Synopsis

This operator allows to reorder regular Attributes of an ExampleSet. Reordering can be done alphabetically, by user specification (including Regular Expressions) or with a reference ExampleSet.

Description

This operator allows to change the ordering ofregularAttributes of an ExampleSet. Therefore, two different order modes may be selected in the parameter sort_mode. If sort mode alphabetically is chosen attributes are sorted alphabetically according to the selected sort_direction. If sort mode user specified is chosen the user can specify rules that define how attributes should be ordered. If sort mode reference data is chosen the input ExampleSet will be sorted according to the order of reference ExampleSet. Note thatspecialattributes willnotbe considered by this operator. If they also should be reordered set them to regular withSet Roleoperator before.

Input

example set

This input port expects an ExampleSet. It is output of the Retrieve operator in the attached Example Process. The output of other operators can also be used as input. It is essential that meta data should be attached with the data for input because attributes are specified in their meta data. The Retrieve operator provides meta data along-with data.

reference data

This input port expects an ExampleSet. If sort mode is set to reference data and this port is connected, the ExampleSet from first port sorted will be sorted according to the order of attributes from this ExampleSet.

Output

example set

The ExampleSet with reordered attributes is output of this port.

original

The ExampleSet that was given as input is passed without changing to the output through this port. This is usually used to reuse the same ExampleSet in further operators or to view the ExampleSet in the Results Workspace.

Parameters

Sort mode

This parameter allows you to select the method you want to use for reordering attributes. It has the following options:

  • user specified: This option allows to specify rules that define how the attributes should be reordered. When this option is selected another parameter (attribute ordering) becomes visible in the Parameters panel. This is the default option.
  • alphabetically: This option simply reorders all regular attributes alphabetically according to the selected sort direction.
  • reference data: This option allows to reorder allregularattributes according to the order of allregularattributes of the reference ExampleSet. If special attributes should also be considered, set them to regular before using this operator.

Sort direction

的方向匹配的属性组rted. If sort mode is alphabetically all regular attributes are sorted according to this direction. If sort mode is user specified, attributes that match a Regular Expression and all unmachted attributes are sorted according to this parameter. Moreover if sort mode is set to reference data all attributes that could not be found in the reference ExampleSet are sorted according to this parameter.

  • ascending: Sort attribute names ascending. This is the default option.
  • descending: Sort attribute names descending.
  • none: Apply no sorting at all.

Attribute ordering

This parameter allows the user to specify rules that define how attributes should be ordered. If the parameter use regular expressions is checked all specified rules are treated as Regular Expressions.

Handle unmachted

Defines how unmachted attributes should be handled. Unmachted attributes can occur if one or more Attribute do not match the rules that the user did provide with the attribute ordering parameter or if one or more Attribute cannot be found in the reference ExampleSet. If they are kept (prepend,append) they will be sorted according to the selected sort direction.

  • append: Append all attributes that are not covered by the provided sorting rules.
  • prepend: Prepend all attributes that are not covered by the provided sorting rules.
  • remove: Remove all attributes that are not covered by the provided sorting rules.

Use regular expressions

If this parameter is checked all rules created with the attribute ordering parameter are treated as Regular Expressions.