I have a batch macro, which is getting a number CSV files as input, and are outputting into a Azure SQL DataWarehouse table via the output tool.
After each file is succesfully loaded into the db, I want to update a control table saying that file XYZ was inserted, such that the same files are not loaded the next time. But I only want to do this update on succesful completion. I have tried a couple of things unsuccesfully:
1) Adding an UPDATE statement for the control table in the POST CREATE SQL STATEMENT
2) Adding a "Parallel Block until done" tool (CReW macro), updating the control table as output 2.
For both of these I have the issue, that they will execute the control table update regardless of whether the insert is actually succesful. If the connection to Azure times out for instance, then no records are loading into the database, but the control table is still updated as if the load was completed.
How would be the best way of conditionally updating a control table, depending on the succes of an output tool? Any advice would be greatly appreciated.
Regards
Casper