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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

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

Post 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
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

Have to do this setting both sides, i.e Source(Oracle Stage) & target(File)
Rgds,
MB
prasanna2883
Participant
Posts: 26
Joined: Tue Oct 23, 2007 4:07 am
Location: Blore,India

Post by prasanna2883 »

Try to use NullToEmpty(EMP_CODE) in the column derivation, and let me know if the problem still exist
asdfasdf
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post 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]
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

prasanna i have also used the nulll to empty in target field derivation, but it didn't work.

Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
prasanna2883
Participant
Posts: 26
Joined: Tue Oct 23, 2007 4:07 am
Location: Blore,India

Post 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
asdfasdf
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post 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
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
consulting
Participant
Posts: 50
Joined: Fri Dec 21, 2007 3:24 am

Post by consulting »

Handle isnull(columnname) and do the process asper your reqirment
handle isnull in all the place like stae variable and transformer
balaji
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post 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
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post 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.
Rgds,
MB
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

my source is oracle table , in oracle stage you cant change any setting for a field
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
prasanna2883
Participant
Posts: 26
Joined: Tue Oct 23, 2007 4:07 am
Location: Blore,India

Post by prasanna2883 »

But u can modify the oracle source query for null handling.
asdfasdf
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

job design plz..!
Rgds,
MB
rajngt
Participant
Posts: 32
Joined: Wed Jan 04, 2006 6:22 am

Post 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
Post Reply