I would like to export data to multiple tables in a database.
If all tables kan be exported, then, they can be written to the database. If there is one or more errors in one of the exports, all other exports have to fail as well.
Is there a way of achieving this in EasyMorph ?
Maybe something like:
- Action database command > start a transaction and create a savepoint
- Iterating over list of CSV-file to export to the database
- After iteration, figuring out if the data has been correctly exported tot the database ==> how to do this check?
- If export was successful > Action database command > end the transaction and release the savepoint
- If the export was not successful > Action database command > rollback to the savepoint