0 / 0
Switch stage: fast path (DataStage)

Switch stage: fast path (DataStage)

This section specifies the minimum steps to take to get a Switch stage functioning.

To use a Switch stage:

  • On the Stage tab, go to the Properties section. In the Input category, choose the Selector mode:
    • User-defined Mapping. This is the default, and means that you must provide explicit mappings from case values to outputs. If you use this mode you specify the switch expression under the User-defined Mapping category.
    • Auto. This can be used where there are as many distinct selector values as there are output links.
    • Hash. The incoming rows are hashed on the selector column modulo the number of output links and assigned to an output link accordingly.

      In all cases you need to use the Selector property to specify the input column that the switch is performed on. You can also specify whether the column is case sensitive or not. The other properties depend on which mode you have chosen:

    • If you have chosen the User-defined mapping mode, under the User-defined Mapping category specify the case expression in the case property. Under the Option category, select the If not found property to specify what action the stage takes if the column value does not correspond to any of the cases. Choose from Fail to have the job fail, Drop to drop the row, or Output to output it on the reject link.
    • If you have chosen the Auto mode, Under the Option category, select the If not found property to specify what action the stage takes if the column value does not correspond to any of the cases. Choose from Fail to have the job fail, Drop to drop the row, or Output to output it on the reject link.
    • If you have chose the Hash mode there are no other properties to fill in.
  • On the Input tab, in the Link Ordering section, specify the order in which the output links are processed.
  • On the Output tab, go to the columns section and click Edit. In the Maps from column input column section, check that the input columns are mapping onto the output columns as you expect. The mapping is carried out according to what you specified in the Properties section.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more