Switch stage in IBM Info Sphere Datastage Tutorial & Fundamentals - Pharma Jobs

Tuesday, January 21, 2014

Switch stage in IBM Info Sphere Datastage Tutorial & Fundamentals

Switch stage:
1.The Switch stage is a processing stage in IBM Info Sphere Datastage.
2.It can have a single input link, up to 128 output links and a single rejects link.
The Switch stage takes a single data set as input and assigns each input row to an output data set based on the value of a selector field.
3.The Switch stage performs an operation analogous to a C switch statement, which causes the flow of control in a C program to branch to one of several cases based on the value of a selector variable.
4.Rows that satisfy none of the cases are output on the rejects link.
 Switch Stage Fundamentals
The Switch Stage in IBM Info Sphere Datastage editor has three pages:
Stage Page. This is always present and is used to specify general information about the stage.
Input Page. This is where you specify the details about the single input set from which you are selecting rows.
Output Page. This is where you specify details about the processed data being output from the stage.

Switch stage properties options
1.Input
2.User defined Mapping
3.Options


1.Input
§  Selector=Column Name

§  Selector Mode=Auto,Hash,User Defined Mapping

1.Auto can be used when there is as many distinct selector values as output links.
2.Hash means that rows are hashed on the selector column modulo the number of output links and assigned to an output link accordingly. In this case, the selector column must be of a type that is convertible to Unsigned Integer and may not be nullable.
3.User-defined Mapping means that the onus is on the user to provide explicit mapping for values to outputs

2.User Defined Mapping
§  Case=?
Specifies user-defined mapping between actual values of the selector column and an output link. Mapping is a string of the form: <Selector Value>[=<Output Link Label Number>], The Link Label Number is not needed if the value is intended for the same output link as specified by the previous mapping that specified a number. You must specify an individual mapping for each value of the selector column you want to direct to one of the output links, thus this property will be repeated as many times as necessary to specify the complete mapping.

3.Options
If Not Find =Fail,Drop,Output

Fail means that an invalid selector value causes the job to fail; Drop drops the offending row; Output sends it to a reject link.

Click Here for more Switch stage in IBM Info Sphere Datastage Tutorial's



No comments:

Post a Comment