Page 1 of 1

Switch Stage

Posted: Wed Jun 18, 2008 6:48 pm
by somu_june
Hi,

Iam using switch stage. I have a column Year and it has value starting from 1990 to 1999, in switch case properties I mentioned

Case = 1990 =0
Case = 1991
Case =1992=1
Case=1993=1
Case=1994
Case=1995=2
Case=1996=2
Case=1997=2

and in options

I mentioned

Discard Value =2

MY aim is to discard year records 1995,1996 and 1997 to the dataset but my job is failing by throwing the following error


Switch_3,0: Output dataset number 2 has no case values assigned to it.


I have Link label values as 0,1,2 and primary reject and datatype of Year input column is integer.


Thanks,
Somaraju.

Re: Switch Stage

Posted: Thu Jun 19, 2008 1:20 am
by ysrini9
somu_june wrote:Hi,

Iam using switch stage. I have a column Year and it has value starting from 1990 to 1999, in switch case properties I mentioned

Case = 1990 =0
Case = 1991
Case =1992=1
Case=1993=1
Case=1994
Case=1995=2
Case=1996=2
Case=1997=2

and in options

I mentioned

Discard Value =2

MY aim is to discard year records 1995,1996 and 1997 to the dataset but my job is failing by throwing the following error


Switch_3,0: Output dataset number 2 has no case values assigned to it.


I have Link label values as 0,1,2 and primary reject and datatype of Year input column is integer.


Thanks,
Somaraju.

Hi,
In switch stage, we need to give like
Case=1990=0
Case=1991=1
Case=1992=2
Case=1993=3
Case=1994=4
Case=1995=5
Case=1996=6
Case=1997=7
Case=1998=8
Case=1999=9

Input data is diveded into 10 output links.
If you need to load 1995,1996,1998 output links data into single Dataset,you can use Funnel stage collects data from these 3 input links then load data into dataset.

Thanks
srini

Posted: Thu Jun 19, 2008 2:43 am
by OddJob
No need to funnel, you can specify the same link for multiple switch definitions i.e. in last example

Case=1990=0
Case=1991=1
Case=1992=2
Case=1993=3
Case=1994=4
Case=1995=5
Case=1996=5
Case=1997=7
Case=1998=5
Case=1999=9

'95, '96 and '98 are all going to link 5.

Posted: Thu Jun 19, 2008 8:55 am
by somu_june
Hi,

Thanks for the reply I want to use the Discard Value option in Switch stage. I know if you mention the link it will go to that link.



Thanks,
somaraju.