Page 1 of 1

how to get Reject records

Posted: Mon Nov 01, 2010 8:39 am
by marpadga18
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

Posted: Tue Nov 02, 2010 4:08 am
by natashab
In the transformer stage, give the constraint to check for isNotnull() of all 7 columns.[ IsNotNull(col1) And ...IsNotNull(col7) ] .

Posted: Tue Nov 02, 2010 4:21 am
by udayk_2007
Other option is,set nullable to 'No' for all columns in the source sequential stage and put a reject link there

Regards
Ulhas

Posted: Wed Nov 03, 2010 2:13 am
by ArndW
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.

Posted: Thu Nov 04, 2010 11:18 am
by marpadga18
natashab wrote:In the transformer stage, give the constraint to check for isNotnull() of all 7 columns.[ IsNotNull(col1) And ...IsNotNull(col7) ] .
hi all,

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 ...

Posted: Fri Nov 05, 2010 12:05 am
by ray.wurlod
It is working as expected.

Good.

Posted: Tue Nov 09, 2010 11:38 am
by marpadga18
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

how to get Reject records

Posted: Tue Nov 09, 2010 12:04 pm
by ajay.vaidyanathan
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.

Posted: Tue Nov 09, 2010 12:04 pm
by nitkuar
could you please provide sample record having junk characters

Posted: Tue Nov 09, 2010 12:14 pm
by marpadga18
nitkuar wrote:could you please provide sample record having junk characters
as of now we dnt have junk characters in file working with sample data.
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

how to get Reject records

Posted: Tue Nov 09, 2010 5:20 pm
by ajay.vaidyanathan
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...