Page 1 of 1

Field 'Emp_code' from input dataset '0' is NULL. Record drop

Posted: Fri Nov 14, 2008 3:35 am
by singhald
Hi All,

I have use the dsxchange search, i found so many way to deal with this situation, but not able to resolve my issue.

I am getting the below warning messages in DS log.

Xfm_Validation,0: Field 'Emp_code' from input dataset '0' is NULL. Record dropped.

I am reading the field 'Emp_code' [Varchar2(1) NULL ] from oracle table using oracle enterprise stage. my traget is sequential file with same metadata 'Emp_code' [Varchar2(1) NULL]

I have handled the null while writing into sequentail stage. there i used Null field value = ''.

But still I am getting the same warning message.

Thanks

Posted: Fri Nov 14, 2008 3:51 am
by mdbatra
Have to do this setting both sides, i.e Source(Oracle Stage) & target(File)

Posted: Fri Nov 14, 2008 3:54 am
by prasanna2883
Try to use NullToEmpty(EMP_CODE) in the column derivation, and let me know if the problem still exist

Posted: Fri Nov 14, 2008 4:02 am
by singhald
hello MDBatra,

can you please tell how to do this setting source side.

i didn't find any option to set in source side.

Thanks

Deepak[/quote]

Posted: Fri Nov 14, 2008 4:06 am
by singhald
prasanna i have also used the nulll to empty in target field derivation, but it didn't work.

Thanks

Posted: Fri Nov 14, 2008 4:28 am
by prasanna2883
It should work but r u recieving the same message? In the source query try to use NVL(EMP_CODE,'') as EMP_CODE.

Is that a direct mapping or do u have any intermediate stages between source and target.

In which stage u r recieving this 'Field 'Emp_code' from input dataset '0' is NULL. Record drop' mesage?

If this doesn't work try to NULLFIELDVALUE property in target sequential file as 0

Posted: Fri Nov 14, 2008 4:37 am
by singhald
i am getting this message in transformer stage, i am not using any intermediate stages. or derivation.

i have one question. if a source filed is null and direct mapped to target field witout any trasformaiton, why we need to do any null handling.\

Thanks

Posted: Fri Nov 14, 2008 4:41 am
by consulting
Handle isnull(columnname) and do the process asper your reqirment
handle isnull in all the place like stae variable and transformer

Posted: Fri Nov 14, 2008 4:43 am
by Romy
The target column for that source column may be non nullable... hence if you try to insert with the null values it wont accept. you need to convert it into a varchar "". In transformer you can add the express ion to that column as if source_file.column_a=@null then '' else source_file.column_a

Posted: Fri Nov 14, 2008 4:47 am
by mdbatra
U need to Double click on the Row no in the Column Tab of Source Stage.
& There u can see the null handling setting.

Posted: Fri Nov 14, 2008 4:55 am
by singhald
my source is oracle table , in oracle stage you cant change any setting for a field

Posted: Fri Nov 14, 2008 5:17 am
by prasanna2883
But u can modify the oracle source query for null handling.

Posted: Fri Nov 14, 2008 5:17 am
by mdbatra
job design plz..!

Posted: Fri Nov 14, 2008 6:12 am
by rajngt
Null field value = ''
change this to Null field value = ' ' (space), try the run now. as you are providing earlier you have provide null value