In many cases, routine processes that are repeated at regular intervals do not consist of a single task, but instead, it consists of a sequence of tasks. In this case, we suggest using composite tasks in DBeaver.
For example, you can import data from one database and then load it to another database or create a dump of a production database and then restore it on stage.
This is a series of articles about tasks in DBeaver. Here you can read the other parts:Working with tasks: how to get started
Database Tasks View: all your tasks in one place
Composite tasks and how to create them (now you are here) How to use Scheduler for your tasks
How composite tasks make life easier
Let’s go back to our hero Louis and look at how composite tasks can make his job easier. One of his work tasks is the analytical research of customers who place orders on the site. Louis does not want to use a production database for this, so he has to regularly transfer the tables he needs to the stage and work with fresh data. He knows that doing it manually each time is not very convenient, which is why he has decided to use a composite task.
Louis can create a composite task in the same way as a single task. This can be done using the main menu or the Database Tasks View, which we talked about in a previous article. To learn more about creating composite tasks, please visit our Wiki.
As Louis does such an analysis regularly, he has a special SQL script that he keeps saved in DBeaver. So, this script can be reused for his composite task. But now he needs to create tasks to export data from one database and import it to another. Both adding existing and creating new tasks are available in the wizard.
Using the toolbar on the right side of the wizard, Louis first adds the script he already has. To do this, he creates a new task with the script’s execution. Next, he needs to create two more tasks for data export and import.
After entering the name of the task for data export and selecting the desired task type from the list, he sets the settings he needs and just click the Save task button. The same thing is with the data import.