Page 1 of 1

Just Mistyped it

Posted: Wed Dec 13, 2006 3:11 pm
by chandrayadaraju
I just mistyped it here. That's Linkname.NOTFOUND. I mentioned the same but the problem is the warnings I am getting.

Posted: Wed Dec 13, 2006 3:23 pm
by ray.wurlod
Unique constraint violated means that you're trying to insert a record in which there's a column value (probably the primary key) that already exists in the table. You need to find out why this is. Use the Debugger or use stage tracing to capture values from a few rows, and inspect the values. Stage tracing is probably better here since you can view/print the text file that it generates.

Posted: Wed Dec 13, 2006 3:56 pm
by chandrayadaraju
ray.wurlod wrote:Unique constraint violated means that you're trying to insert a record in which there's a column value (probably the primary key) that already exists in the table. You need to find out why this is. ...
Thats true. But the problem is, as I am doing a look up on ID, Name ,it should not pass those rows (as those rows were already present in the table) because I have a constraint hashlink.NOTFOUND.

(Here the file does a lookup on id, name with source_System_ref table and if the keys are not matched, we insert the new record into the same table(SourcE_System_ref). Here I used hashlink.NOTFOUND constraint in order to get the rows which are not matched. If the same records appear in the next file, then it is not able to match the previous records existed in the database. As per my observation, the spanich charcter is appearing in a different way in the database. Thats the reason it couldnt match. )

Posted: Wed Dec 13, 2006 7:53 pm
by ray.wurlod
Well look at all the other possibilities. For example, was the hashed file loaded from Char data types that might have trailing spaces? Does the stream input have Char data type? In this particular case the fix is to Trim() both the load into the hashed file and the reference key expression in the Transformer stage doing the lookup.

As you can probably appreciate, it's difficult to diagnose from this distance.
You have more knowledge about the job design, and are gaining the experience in troubleshooting techniques. All I can offer is that, if the values match exactly, the lookup will succeed.