You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi all,
I am using Talend Open Studio to do some data syncing, but I have a question about how much capability this version has to do things like rollbacks and implement business rules.
For example, I may have 2 CSV files, one with parent records and one with child records.
If the parent record uploads/syncs successfully, but the child records fail to insert, then I would like to have it rollback so there aren't orphan records.
It looks like this is covered through "Business Rules" under the Implementation section on their feature matrix:
http://www.talend.com/products-data-integration/matrix.php
But it only comes with the commercial suite, not the open source version. Is there a way of implementing something like this in Open Studio?
Thanks,
Nathan
Hi alevy,
Thank you for your reply.
I can try what you suggest, but wouldn't that only work to roll back the insert that failed? What about other inserts that were successful, but that should then be rolled back because of the failure? Sort of like setting up a transaction.
Thanks,
Nathan
Hi
It is very possible, but the job design depends on your request, do you want to rollback all the records include the parent records and child records? or either of them? Can you upload a screenshot of job you are working on now?
Best regards
Shong
Offline
Hi shong,
I actually don't have the job set up yet so I can't take a screenshot of anything.
To answer your question though, in my example, if the parent record gets inserted successfully and the child records fail, I'd like both the parent and child records to be rolled back. Essentially, the each parent and associated child record insert is a "transaction."
Thanks,
Nathan

In the connection component, uncheck "auto commit". Nothing will be committed until you use a commit component and everything since last commit will be rolled back if you use a rollback component. If you have multiple parents you need to commit each parent and child(ren) group separately. Have a go and put up some screenprints and sample data if you have a problem.
Offline
Thank you for the suggestions! I will give those a shot to see if they will work for me!
If the job were exported as a war file, deployed to a server, and called via java classes, would turning off and on auto commit on the java connection also be a viable solution? Any idea on performance hit when committing such a small batch. Throughput is excellent for large
batches.
janhess wrote:
You would need to design your job as a transaction so you commit every time you have a successful child insert.
Hi,
I'm trying to design my job in that way, with no success yet.
I don't understand how to trigger a commit (or a rollback) each time a row has been processed. With my actual job design (see attached picture) a rollback will avoid all inserts since the beginning of the job. How to modify my job in order the rollback avoid only the current insert ? Do I need to use iterate connections ? If yes, how to use them to get this kind of behavior ?
Thanks
Offline
Pages: 1