Once jobs have been created, you can edit their tasks.
- A job can only be edited when it is not running and only if the job is scheduled. Completed jobs remain in the list but only logs remain.
- JOB TASK LIMIT - There is a maximum number of 999 tasks that can be added to a job.
To edit the tasks of a job
Select the job from the middle pane and then right-click the job to select Edit Tasks from the context menu.
The Define tasks window is displayed.
The screen has two main areas. The right pane shows the tasks to be run for this job and the left pane lists all the objects.
Adding a task
Double-click an object in the left pane to add it to the task list in the right pane. Normally objects, such as Load or Fact tables are scheduled rather than procedures.
Setting the action on a task
Each task can have a specific action that is to be performed on its object.
The default action for load tables is process. This means that when the task is actioned, it will drop any indexes that are due to be dropped, or have pre-drop set, then load the table and perform any post-load procedures or transformations and then re-create any dropped indexes.
The default action for all other tables is the same as above, except it will execute the update procedure rather than loading the table.
You can change the action on a task by right-clicking the task in the right pane. The menu options are shown below.
The following task actions are available:
Action | Description |
---|---|
Drop | Drop table, view, or index. |
Create | Create a table, view, or index. |
Truncate | Delete all rows from the table. |
Initial Build | Drop All Indexes then Custom then Build All Indexes. |
Drop All Indexes | Drop all indexes on the table. |
Pre Drop Indexes | Drop all indexes on the table marked as "Pre Drop". |
Load | Load the table (Load tables only). |
Custom | Run the custom procedure on the table. |
Update | Run the update procedure on the table. |
Execute | Execute the procedure or host script. |
Process | Pre Drop Indexes then Update and then Build Indexes. |
Process and Statistics | Process then Default Stats as defined in the Table Properties > Statistics > Process and statistics method (DB2 only). |
Build Indexes | Build the indexes on the table marked as "Pre Drop". |
Build All Indexes | Build all indexes on the table. |
SQL Server: Analyze | Performs:
|
SQL Server: Quick Analyze | Performs:
|
SQL Server: Stats | Same as Analyze. |
SQL Server: Quick Stats | Same as Quick Analyze. |
Not all actions are available on all object types.
Creating dependencies between tasks
You can create dependencies between tasks in the list by selecting one or more tasks and right-clicking to bring up the dependency options.
The following task dependency options are available from the menu:
Task Option | Description |
---|---|
Group Selected Tasks | Groups two or more selected tasks to have the same order value, allowing them to run in parallel if the maximum threads setting allows. |
Ungroup Selected Tasks | Un-group selected tasks. |
Sync with Item Above | Changes a selected task to have the same order value as the task above it, allowing them to run in parallel if the maximum threads setting allows. |
Sync with Item Below | Changes a selected task to have the same order value as the task below it, allowing them to run in parallel if the maximum threads setting allows. |
Decrease the Order | Changes a selected task to an order number one less than its current value. The task will now run immediately before it would have previously. |
Increase the Order | Changes a selected task to an order number one more than its current value. The task will now run immediately after it would have previously. |
Ordering or Grouping the tasks
The Order column shows the order in which the tasks are to be run, e.g. 20.20 If the two numbers are the same as another task then those tasks can run in parallel. If the two numbers are different then those tasks run sequentially. This is an initial definition of dependencies. These dependencies can be altered specifically once the job has been created.
Tasks can be moved up or down by selecting the task and clicking the Move Up or Move Down buttons.
To respace the order of the tasks; to group or ungroup object types, use the buttons at the bottom of the Define tasks window.
Button | Description |
---|---|
Respace Order | Click to respace the order numbers. The existing dependency structure and groupings are retained. The purpose of this button is simply to allow room between tasks to fit new tasks. For example, if we have two tasks that have an order of 20.19.5 and 20.20.6 and we want to add a task between these two tasks, we can click the Respace Order button to open up a gap between the two tasks. |
Group Object Types | Click to put all objects of the same type into groups. For example, all load tables will be able to run in parallel, all dimensions, etc. |
Ungroup All | Click to remove all groupings and make all tasks sequential. New groupings can be made by selecting a range of sequentially listed tasks in the left pane and using the right-click menu option Group Selected Tasks. Tasks that are grouped have the same first two numbers in the order and can execute at the same time if the job has multiple threads. |
Upon completion of adding tasks, click OK to exit.