on 10-10-2012 9:26 AM
Hi experts,
How to insert only the valid records in to DB using JDBC receiver adapter.
we are doing a transaction which contains 10 records ,that should be inserted in DB using JDBC receiver adapter.
Ex: 10 records sent at a single transaction, in which 1 record has invalid value, so records are not inserted in to DB.
Is there any option in PI to eliminate the 1 failed record and process remaining 9 records to insert in to DB.
Regards,
Baskar
>Is there any option in PI to eliminate the 1 failed record and process remaining 9 records to insert in to DB.
If all goes in one transaction then the answer is NO.
Use validation in mapping or schema validation in the pipeline steps either at adapter engine or integration engine before processing. I would also recommend stored procedure in your case since message volume is going to be on the higher side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1)First consider writing a validation at ECC level, if you are dealing with IDocs then i dont see you issues with data like(length),if you think more validation required then better to check with ECC team handle it.
2)As a PI consulatant even you can write mapping logic to perform validtaion and even you can supress those records at PI level.
3)Use stored procedure at data base level and ask DB team to write validation logic , before inserting data in to table they have to write a logic in stored procedure, this is very common practice writing validtaions in stored procedure.
What exactly your validation logic?how you idetify good record or bad record.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Baskar,
you can build 10 statements in mapping time - instead of 1 statement with 10 records. Of course the performance will be worth, but if you do not have like 1000 records by minute: it does not matter.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below options
1) use stored procedure at receiver DB side
2)use udf and play with payload
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.