Handling nulls in Stage Variables In Transformer
Moderators: chulett, rschirm, roy
Handling nulls in Stage Variables In Transformer
Hi
There are null values coming in from source and i need to set a flag for this field(Empid), but when i try to check if Empid is null in Stage variable, the records get dropped, and the same applies for date of birth field, DOB,
Is there anyother way in Transformer by making use of Stage Variables i can set the Flag to "N" for Null Values
There are null values coming in from source and i need to set a flag for this field(Empid), but when i try to check if Empid is null in Stage variable, the records get dropped, and the same applies for date of birth field, DOB,
Is there anyother way in Transformer by making use of Stage Variables i can set the Flag to "N" for Null Values
Thanks and regards
raman
raman
hi
I am trying to substitue "N" for nullsMaveric wrote:Check the nullability of your target fields. Post the derivations here. Are you trying to substitute N for a NULL, or are you just checking for null and populating the Flag field to N?
Thanks and regards
raman
raman
What is the Data type of your input and output fields? And Why use stage variables? A simple derivation like
would do. This will work only if the data type is char or Varchar. Only then would you be able to substitute the value N.
Code: Select all
If IsNull(In.EmpID) Then "N" Else In.EmpID
It is our choices that show what we truly are, far more than our abilities - J.K.Rowling
Thanks but i need to route the records
Thanks but i need to route the recors to Error Link, so i have to make use of StageVariables, Kindly suggest how i can solve this using StageVariables, and route the records based on the value contained in StageVarialble (Null_F)Maveric wrote:What is the Data type of your input and output fields? And Why use stage variables? A simple derivation likewould do. This will work only if the data type is char or Varchar. Only then would you be able to substitute the value N.Code: Select all
If IsNull(In.EmpID) Then "N" Else In.EmpID
Thanks and regards
raman
raman
Re: Thanks but i need to route the records
No, you don't have to use stage variables. You can use your null check directly in the constraint that 'routes' the records.ds_raman wrote:Thanks but i need to route the recors to Error Link, so i have to make use of StageVariables
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: Thanks but i need to route the records
chulett wrote:No, you don't have to use stage variables. You can use your null check directly in the constraint that 'routes' the records.ds_raman wrote:Thanks but i need to route the recors to Error Link, so i have to make use of StageVariables
Solved the problem.,
Thank You,
Thanks and regards
raman
raman
Re: Thanks but i need to route the records
chulett wrote:No, you don't have to use stage variables. You can use your null check directly in the constraint that 'routes' the records.ds_raman wrote:Thanks but i need to route the recors to Error Link, so i have to make use of StageVariables
Solved the problem.,
Thank You,
Thanks and regards
raman
raman