Page 1 of 2
null handling error
Posted: Tue Jun 19, 2007 11:49 am
by scorpion
hi all,
could any one please through some light to solve my problem:
error is:
Fatal Error: Null value on the accessor interfacing to field "XXX".
i checked source and target(xxx)fields length and nullable-yes options.
but still i am getting error.
please help me on this.
tx in advance.
Posted: Tue Jun 19, 2007 11:53 am
by DSguru2B
Are there any other surrounding error/warning messages? See if
this post helps.
Posted: Tue Jun 19, 2007 3:07 pm
by scorpion
hi dsguru2B
Thanks for the reply and i tried same as mentioned in the post.
but i am still getting the same error.
tx
Posted: Tue Jun 19, 2007 4:04 pm
by ArndW
In which stage is this error occurring?
Posted: Tue Jun 19, 2007 7:19 pm
by ray.wurlod
Please post the entire, exact error message, and a description of your job design, including the stage types used.
Posted: Wed Jun 20, 2007 1:35 am
by scorpion
Hi,
Following are the error messages i am getting,when i run my job:
1)Transformer_145,0: Failure during execution of operator logic.
2)Transformer_145,0: Fatal Error: Null value on the accessor interfacing to field "xxx".
3)node_node1: Player 27 terminated unexpectedly.
This job basically extract the data from sybase tables and load the data into dataset,after looking up some sybase tables.
I am getting this error in one of the transformer stages.
In the transformer stage(Transformer_145) i am using derivation for one of the target field (yyy)like:
If IsNull(DSLink147.xxx) Or Trim(DSLink147.xxx) = "" Then "" Else (DSLink147.yyy)
for 'xxx' field,i am getting this error message.
Please help me on this.
thanks in advance.
Posted: Wed Jun 20, 2007 1:40 am
by ray.wurlod
Is DSLink147.xxx defined as Nullable ?
Posted: Wed Jun 20, 2007 1:41 am
by ArndW
What is your input stage passing xxx into the transform and is the nullability of xxx the same there? Also, I would recommend removing the parenthesis around the else clause of the derivation {but I don't think that is causing your problem}
Posted: Wed Jun 20, 2007 1:46 am
by scorpion
Yes ray/arndw,
DSLink147.xxx defined as Nullable. for that column the option:
'Nullable' is set to 'yes..
Posted: Wed Jun 20, 2007 1:52 am
by balajisr
Do you have any null values in your input column xxx?
This could be your problem if you have null values in your input column.
Posted: Wed Jun 20, 2007 1:57 am
by scorpion
yes balaji,
there is null values in input column xxx.
but i used derivation in Transformer_145,to handle nulls, like:
If IsNull(DSLink147.xxx) Or Trim(DSLink147.xxx) = "" Then "" Else (DSLink147.yyy)
thanks
Posted: Wed Jun 20, 2007 2:01 am
by scorpion
and the column 'xxx' is Varchar-50
the column 'yyy' is Integer-10
do i need look into this way?
Posted: Wed Jun 20, 2007 2:10 am
by balajisr
You need to change your derivation to something like this:
Code: Select all
If IsNull(DSLink147.xxx) then "" else if Trim(DSLink147.xxx) = "" then "" else DSLink147.yyy
You cannot trim a null value.
Posted: Wed Jun 20, 2007 2:18 am
by ArndW
Balajisr - good catch! I saw the problem as well, but got caught in a short meeting before being able to hit "post", and now I'm editing out my response since you did a better job in the meantime!
Posted: Wed Jun 20, 2007 6:04 am
by ray.wurlod
And, indeed, that's where I was headed with my question. Do let us know whether this change fixes the problem and, if it does, mark the thread as resolved.