Page 1 of 1

Stage Variable problem

Posted: Fri Jul 11, 2008 2:45 pm
by somu_june
Hi,

Iam using a stage variable "SV" and it has data type varchar 255, in derivation field for SV I have given expression as

IF ln1.DIV = '20' then (Trim(ln1.con),4) else SetNull()


When Iam compiling a job it is giving an error saying


Setting null to this non-nullable field: StageVar0_SV.


I need help in this stage variable issue. My question is can I use SetNull function in stage variable, if so how to do that


Thanks,
Somaraju.

Posted: Fri Jul 11, 2008 3:14 pm
by chulett
The short answer is 'no'. As noted, they are non-nullable.

Posted: Fri Jul 11, 2008 5:41 pm
by ray.wurlod
Use an "In-band null" - a value that is valid for the data type, that represents null and that will not otherwise appear in the data. Convert this to an actual null in a downstream Modify stage using handle_null() or a Transformer stage.