I am having sequential file as source....
my input data is
deptno,dname,loc
10,aaa,hyd
20,bbb,ban
30,,che
in third row i am not having the dname information ...
but i want to replace empty dname with 'xxxx'...
i.e.,
o/p:
dno,dname,loc
10,aaa,hyd
20,bbb,ban
30,xxxx,che
give the process please......
In Sequential file output
Moderators: chulett, rschirm, roy
read the sequential file as i/p and feild delimiter as comma
then pass the output to transformer stage
and try to following logic:
And now pass this transformer result to target it will help.
then pass the output to transformer stage
and try to following logic:
Code: Select all
isNull(columnname) then
"XXX"
else
columnname
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Kamashil's suggestion will only work if your Sequential File stage that reads the file converts missing values to null. This is, of course, the default setting. If, however, you represent null differently, then you need specifically to handle the missing value differently, perhaps with a test against the literal string "".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 26
- Joined: Mon Apr 21, 2008 4:03 am
- Location: Amalapuram
Re: In Sequential file output
Create a stage variable for dname column and write the derivation as If (dname=''then 'XXXX' else dname).This will work check it out
Sagar