Restarting a Job

Problem

You want to restart a SAS Data Integration job after it has failed to complete successfully.

Solution

You restart the job from the first checkpoint that follows the error in the job. For information about adding checkpoints to jobs, see Adding Checkpoints to a Job. Perform the following tasks:

Tasks

Run a Job That Includes Checkpoints

Perform the following steps to run a job that includes one or more checkpoints:
  1. Open a job that the contains checkpoints. For example, the sample job shown in the following display contains two checkpoints that are attached to selected transformations.
    Sample Job with Checkpoints
    Note (1) the checkpoint icons in the upper-right corners of the Splitter transformation and the first Extract transformation and (2) the message Checkpoint Enabled in the title bar of the Job Editor window. The first Extract transformation contains an error.
  2. Right-click on an empty area of the job, and click Run in the pop-up menu. SAS Data Integration Studio generates code for the job and submits it to the SAS Application Server for execution. The following display shows the results of the run.
    Sample Job After First Run
    Sample Job After First Run
    The error causes the job to fail at the Append transformation.
  3. Correct the error that caused the job to fail. In this case, you can specify a minimum height for female employees (Height > 60) in the properties window for the first Extract transformation. Now you can use the checkpoints in the job to enable you to restart it at the appropriate place.

Restart the Job From a Checkpoint

Perform the following steps to restart the job at the checkpoint attached to the first Extract transformation:
  1. Right-click on an empty area of the job, and click Run in the pop-up menu. The Run Options window is displayed.
  2. Select the check box to restart the job from the appropriate checkpoint. Note that only the last successful checkpoint is saved when a job with multiple checkpoints is run. The saved-state information of the last successful checkpoint overwrites the information from earlier checkpoints. The check box in the sample job is named Restart from checkpoint taken immediately before Extract. This selection ensures that the job restarts with the second Extract transformation.
  3. Click OK to restart the job. The following display shows the restarted job.
    Sample Restarted Job
    Sample Restarted Job
    Note that the steps for the Sort and Splitter transformations and the first Extract transformation are marked as Skipped on last restart on the Status tab. In addition, a note about the restart is added to the Details column for the step for the second Extract transformation.
  4. Right-click the output table for the job. Then, click Open in the pop-up menu to access the View Data window for the table. The following display shows the output for the sample job.
    Output for a Sample Job
    Output for a Sample Job
    Note that only female employees with a height greater than 60 are included in the output. Thus, you can generate the desired output even when you restart a corrected job and skip some of its steps.
Last updated: January 16, 2018