the DBOutputTable is capable of returning records that were successfully inserted into a database, as well as returning those that failed. You could take advantage of one of these features to achieve the desired result. Attached is an example solution of how this can be approached. The main idea of the graph is that the query (which is updating the status table) is stored in a dictionary as a single string value and is set to "UPDATE STATUS_TABLE set STATUS = 'SUCCESS'" by default. If no record fails in the process of inserting data into the database, the DBOutputTable component will not send any records on the port 0, thus not affecting the query in the dictionary. On the contrary, if there was even a single record that failed during the inserting process, it will result in changing the dictionary value to "UPDATE STATUS_TABLE set STATUS = 'FAIL'". In the next phase, there is a DBExecute component that will run the query in the dictionary and update the status table respectively.
- (4.92 KiB) Downloaded 132 times