Page 1 of 1

Hash Rejects

Posted: Fri Mar 31, 2006 1:35 pm
by Dsnew
Hi all,

I am loading data from a Fact table to an Aggregate table, doing lookup on two hash files.
Some of the data gets rejected as it cannot find it in the the lookup in the hashed file.
I have defined a stage variable stgNotFound as

Code: Select all

if (hashA.NOTFOUND or hashB.NOTFOUND) then 'N' else 'Y'
Then i have added the constraint on the Aggregate table Insert as

Code: Select all

stgNotFound = 'N' 
and i have a reject file for which the constraint is

Code: Select all

stgNotFound = 'Y'. 
I still get rejects in the log of the director ??
Also the number the Output Rows + Reject Rows is not equal to the Input Rows.

Any clues as to where i am going wrong??

Posted: Fri Mar 31, 2006 1:59 pm
by sjhouse
The reason you are getting a message in Director is that you checked the reject row box in the constraints. This will generate a warning message if any rejects are encountered.

Posted: Fri Mar 31, 2006 2:15 pm
by narasimha
Another scenario could be that your hashed file is not updated, there might be some headings are not existing in the hashed file. In such a case you would get rejects, even though you have not checked the reject check box in the constraints.

Re: Hash Rejects

Posted: Fri Mar 31, 2006 3:43 pm
by gateleys
[quote="Dsnew"]

Code: Select all

if (hashA.NOTFOUND or hashB.NOTFOUND) then 'N' else 'Y'
[quote]
Have you checked if there are anly trailing spaces in your key fields? Make sure that your input comparison field is trimmed, and then try -

IF(ISNULL(TRIM(hashA)) format to look for match/mismatch.

gateleys

Re: Hash Rejects

Posted: Fri Mar 31, 2006 3:48 pm
by gateleys
By the way, why do you have that OR condition in the constraint? Can you tell us what you are passing to the output link. Otherwise, if contents of both hashed files are the same, you could merge all the data into a single hashed file. I am not a fan of OR in this kind of situations.

gateleys

Posted: Fri Mar 31, 2006 3:59 pm
by Dsnew
Thanks narasimha,

You are right, i did not get any rejects after I re-ran my hash jobs.

Posted: Fri Mar 31, 2006 4:01 pm
by gateleys
Dsnew wrote:Thanks narasimha,

You are right, i did not get any rejects after I re-ran my hash jobs.
Good. But, how about the counts, are they right?

gateleys

Posted: Fri Mar 31, 2006 4:04 pm
by Dsnew
Yes gateleys,
I am capturing the rejects in a reject file, I will later updaet my hash files with these missing values
Thanks for you inputs