Hi Davide, The local native pipeline run configuration [1] has a "Make this pipeline transactional" option that allows you to do what you're looking for.
[1] https://hop.apache.org/manual/latest/pipeline/pipeline-run-configurations/native-local-pipeline-engine.html Regards, Bart On Tue, Aug 27, 2024 at 11:24 AM Davide Cisco <[email protected]> wrote: > Hello, > > I would like to write a pipeline/workflow that allows me to control a > transaction when writing in a database, but I can't find the proper > transforms/actions. > > More specifically, what I would like to do is the following: > - connect to a database and begin a transaction > - truncate and store data in various tables (coming from various sources: > files, web services, another DB) > - end the transaction and commit if everything went fine, otherwise > rollback (or abort without commit) > > By using just the Table output transform the tables are correctly updated > if everything went fine, but in case of errors the default options leave > the database in an inconsistent state: tables could have been partly > populated, or some or those may have been updated and some others not. > > Is there any way to control transactions in Hop (excluding the - partial - > workaround of copying data in a temporary/secondary table and then move > them in the corresponding primary table)? > > Thanks for your help > > DC >
