Hi Bart,

if I get correctly, the safest way to do that would be:
- create a new Workflow Run Configuration (WRC) with the "Make this
pipeline transactional" option enabled
- set this new WRC to the "critical" pipeline that loads/copies data

If I modified the setting directly in the default "local" WRC, I would have
transactions enabled for all the pipelines in the Hop workspace (even when
those are not necessary), correct?

Thanks for your support

DC


Il giorno mar 27 ago 2024 alle ore 11:29 Bart Maertens <[email protected]>
ha scritto:

> 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
>>
>

Reply via email to