How to execute a task only once in Prefect?

272 Views Asked by At

I have a flow in Prefect, where the the starting and the stopping of the DB client is happening for each mapped task. Below is a visual of the end of an example ETL.

The save_transformed_data_to_db takes an unmapped(database), unmapped(db_client) and a mapped data values.

Is there a way to set a task to run only once at beginning and once at end of the full flow and if yes - how?

enter image description here

0

There are 0 best solutions below