Skip to main content
Open

Execute database writer before/after SQL as a transaction

Related products:FME Form
  • August 30, 2023
  • 1 reply
  • 34 views

lifalin2016
Influencer
Forum|alt.badge.img+40

I have several workspaces that write to a database, which utilizes the "SQL To Run Before/After Write" feature. Often the "before" actions consists of multiple DELETE statements, to clear tables for insertion of new data.

Unfortunately these are run as singular statements. I.e., if an error occurs, e.g. a timeout, the previous deletes are not rolled back, as it would be in a transaction. I've tried to insert an explicit transaction (MS/SQL), but it doesn't work as intended.


Why doesn't FME wrap any before/after SQL's as a single transaction, and perform a COMMIT command if all's well, or a ROLLBACK command if an error occurs ?


Most databases handles transactions. If a specific database doesn't, just skip this part.

1 reply

lifalin2016
Influencer
Forum|alt.badge.img+40
  • Author
  • Influencer
  • August 30, 2023

I've already seen this idea from 2017, but nothing has been done.