how to get Reject records
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
how to get Reject records
hi all,I am new to datastage need some inputs
my requirement is
source seq-file satge>>transformstage>> sqlserver_tgt stage
I have 7 columns in a row from source
if any column in the row is null i have to reject the entire row
could any one could suggest a way would help me new to datastage
my requirement is
source seq-file satge>>transformstage>> sqlserver_tgt stage
I have 7 columns in a row from source
if any column in the row is null i have to reject the entire row
could any one could suggest a way would help me new to datastage
Thanks,
M
M
-
- Participant
- Posts: 72
- Joined: Wed Dec 12, 2007 2:29 am
You won't get an "null" values from your source sequential file unless you explicitly define default values and null replacements for each column in your source.
Or do you mean "empty" values rather than "null" - there is a big difference.
Or do you mean "empty" values rather than "null" - there is a big difference.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
hi all,natashab wrote:In the transformer stage, give the constraint to check for isNotnull() of all 7 columns.[ IsNotNull(col1) And ...IsNotNull(col7) ] .
In transformer stage i gave consraint for
output link:
Trim(Src_Input_link.column1)<> '' And
Trim(Src_Input_link.column2)<>'' And
Trim(Src_Input_link.column3 <>'' And
Trim(Src_Input_link.column4) <>'' And
Trim(Src_Input_link.column5)<> ''
reject link:
Trim(Src_Input_link.column1)='' Or
Trim(Src_Input_link.column2)='' Or
Trim(Src_Input_link.column3 ='' Or
Trim(Src_Input_link.column4) ='' Or
Trim(Src_Input_link.column5)=''
it is working as expected
if i am doing anything wrong please suggest me if I am wrong if it is corect I will resolve this topic ...
Thanks,
M
M
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
ray.wurlod wrote:It is working as expected.
Good. ...
haveing trouble when i use the constraints as above mentioned it is working but when in the source data has junk caharacter in the columns it is not rejecting to reject file it is loading to target which is should not do
I am using constraint
Trim(Src_Input_link.column1)<> '' And
Trim(Src_Input_link.column2)<>'' And
Trim(Src_Input_link.column3 <>'' And
Trim(Src_Input_link.column4) <>'' And
Trim(Src_Input_link.column5)<> ''
reject link:
Trim(Src_Input_link.column1)='' Or
Trim(Src_Input_link.column2)='' Or
Trim(Src_Input_link.column3 ='' Or
Trim(Src_Input_link.column4) ='' Or
Trim(Src_Input_link.column5)=''
need to reject if junk charecters found
Thanks,
M
M
-
- Participant
- Posts: 53
- Joined: Fri Apr 18, 2008 8:13 am
- Location: United States
how to get Reject records
To identify junk values you can still make use of the existing transformer stage and filter out the junk values there itself. Just identify the ASCII values for the junk values you are getting in the file and have them filtered in the transformer stage. if it is only 1 or 2 values you can directly use them in the transformer stage instead of their ASCII values.
Regards
Ajay
Ajay
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
as of now we dnt have junk characters in file working with sample data.nitkuar wrote:could you please provide sample record having junk characters
in near future if we found any junk characters we should reject it but anyway asume these are the junk characters
‿‿‿‿×¢×¢ |PRO |sgahtsgsa |17500 |31/12/20|01/01/06
when testing with sample data not able to reject.need some inputs
Thanks,
M
M
-
- Participant
- Posts: 53
- Joined: Fri Apr 18, 2008 8:13 am
- Location: United States
how to get Reject records
your junk data itself is very wierd.... ususally junk characters like {},#,....etc. appear which needs to be cleansed... and for that we usually go for the way i suggested earlier.... identify the ASCII value and remove them by adding a constraint.... this will help you solve your problem with less (or) no design change...
Regards
Ajay
Ajay