Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Transaction bracket / group

Hi *,
for a migration case I need to group the insert actions into three/four tables into ONE transaction. That has to be done RECORDWISE, meaning per source record three/four records in target tables have to be written. If I get an insert error, the transaction for THIS source record has to be rolled back and protocoled. Then the next source record starts this cycle again.
In the documentation I only found COMMIT/ROLLBACK operations for the complete operation, meaning for ALL source records at once.
Any suggestion/pointer appreciated.
Thanks,
Steve
Labels (2)
1 Reply
alevy
Specialist
Specialist

How about using flows from the tMap e.g.
-- first output flow from tMap to tJavaRow with: globalMap.put("Commit",true);
-- then your current three output flows to your DB
- each reject flow from the output components should also go to a tJavaRow with: globalMap.put("Commit",false);
-- fifth output flow from tMap to commit component with filter: (Boolean)globalMap.get("Commit")
-- sixth output flow from tMap to rollback component with filter: !(Boolean)globalMap.get("Commit")