i need help in checking refrential integrity between 2 tables. I am using 5.2 versions, so many of the stages are unavailable.
any kind of info or help is appreciated.
The standard approach is to read your source table as an input stream and do a referential integrity check in a transformer using a lookup or reference stage.
A lookup source can be a database table or it can be a hash file. Hash files tend to be the fastest type of lookup in DataStage so your job will run faster if you can dump your lookup fields into a hash file first, only export those fields you need.
Within the transformer you lookup the hash file based on your foreign key field. You can add a constraint to reject those rows without a lookup match, you can add an output link to save the rejected rows to a file or table, you can output an error message field with each row indicating what the problem was. There are lots of error handling options.
hi
thank you so much for the help.
really appreciate it. will try all the combinations you gave. coz the error output of the refrential integrity check needs to be sent to another sequential file which should also generate the error details.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.