Page 1 of 1
Reject Link from a Sequential file
Posted: Wed Feb 07, 2007 6:02 am
by srinagesh
Hi !
I have a flat file with the following records
Code: Select all
"Empno","Ename","Salary","Deptno","JoiningDate"
1,"a",5000,100,2006-01-01
2,"b",,100,2006-01-01
3,"c",,,
The Column definition of the sequential file stage is
Code: Select all
Empno number(4) not null
Ename varchar(50) not null
Salary decimal (12,5) not null
deptno number(4) not null
Joining Date Date not null
I have designed a datastage parallel job to read from this flat file and populate the Oracle database table (one-to-one mapping).
I have a reject link from the flat file to handle reject records.
I expected the records 2&3 to be rejected in the reject link. But this is not the case.
Do you have any pointers for this?
Regards
Nagesh
Posted: Wed Feb 07, 2007 6:05 am
by ArndW
Did you specify a "default value" in the attributes for the column "Salary"?
Posted: Wed Feb 07, 2007 6:57 am
by srinagesh
Yes, I have tried giving a default value and have tried removing the default value. I couldnot find any difference.
It wasnot going into the reject link
Posted: Wed Feb 07, 2007 7:40 am
by ArndW
If you give it a default value or handler or nulls then the row won't be rejected. Do rows 2 and 3 go down the "normal" link?
Posted: Wed Feb 07, 2007 8:01 am
by DSguru2B
In the properties tab of sequential file stage, what have you set the "Reject Mode" to?
Posted: Wed Feb 07, 2007 9:20 am
by srinagesh
I have set the reject property as "output". It will output the reject records into the reject link.
Posted: Wed Feb 07, 2007 9:36 am
by DSguru2B
I just recreated a sample job similar to your situation and its working fine provided you are not giving a default value. Can you confirm that the value is infact not space and just empty.
Posted: Wed Feb 07, 2007 9:46 am
by srinagesh
Hi DSGuru,
Can you send me the dsx file so that I can have a look at the same please.
Regards
Nagesh
Posted: Wed Feb 07, 2007 10:10 am
by DSguru2B
I am not sure If I can do that but I can certainly explain you all the properties i set.
FOr column meta data I created a file with your sample data and imported it. Fixed the length and precision.
Under Properties, for options I had
First Line is Column Names = True
Keep File Partitions = False
Missing File Mode = Depends
Reject Mode = Output
Report progress = Yes
Under Formats tab I had
Final Delimiter = end
Delimiter = comma
Quote = double
Rest all are defaults.
When hit view data, if you dont see records 2 and 3, then they will be rejected.
Posted: Wed Feb 07, 2007 1:17 pm
by ray.wurlod
Are the fields nullable? If so, how have you set the Null Field Value property? The empty fields may be being read as NULL. What data are being imported into the job?
Posted: Mon Feb 18, 2008 3:40 pm
by sajarman
Have you specified APT_STRING_PADCHAR to any value? Are you getting the records 2 & 3 in the normal link? then what are the values for the columns?
How about the NULL_VALUE in format tab, have you set it to some value?