About Restarting Jobs - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.00
Published
December 2016
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
rdo1467305237457.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

Data Mover provides table-level restarts. A table-level restart indicates that prior to the job failure, all of the table rows were copied successfully. Data Mover will not copy the table rows again if the job is restarted. However, if the job fails at any point while copying the rows for a table, Data Mover copies all of the table rows again when the job is restarted.

Data Mover jobs can only be restarted using the restart command under the following conditions:

  • The job failed while running. The job has a status of FAILED when viewed with the status or list_jobs commands.
  • The job was stopped with the stop command. The job has a status of USER_CANCELLED when viewed with the status or list_jobs commands.

In either case, do not run the cleanup command before restarting the job, or all work that the job did will be lost. Also, resolve whatever issued caused the job failure before restarting the job.

After the issue is resolved, you can restart the job with the datamove restart -job_name <job name> command.

Restart Actions

Data Mover takes different actions when restarting a job, depending on the step in which the job failed. Actions are described in the following table:

Restart Actions
Step Description Data Mover Action During Restart
CLEAN_UP Added to restart jobs. Tasks for cleaning up remnants of a failed job process. Runs the entire restart job again.
MOVE_DEFINITION_BEFORE_LOAD Tasks for setting up staging tables. Finishes performing setup tasks that were not completed, then runs the rest of the job.
MOVE_TABLE_DATA Teradata ARC, Teradata PT API, or Teradata JDBC tasks used to copy the table. If using Teradata ARC:
  • Removes any remaining HUT locks and stops any online archiving started by Data Mover for the job.
  • Re-transfers all data for tables that did not have data completely transferred.
  • Runs the rest of the job.

If using Teradata PT API or Teradata JDBC:

  • Drops any remaining error, log, or work tables.
  • Drops and re-creates the staging table if the data had not been completely transferred.
  • Drops and re-creates the target table if all of the following conditions existed:
    • A full-table copy was being performed.
    • The target table was being directly loaded (instead of loaded to a staging table).
    • The data had not been completely transferred to the target table.
  • Re-transfers all data for tables that did not have data completely transferred.
  • Runs the rest of the job.
RESOLVE_TABLE_AFTER_LOAD Tasks such as performing INSERT or SELECT statements from staging to the target table, and adding indexes and triggers. Completes tasks that were not completed, then runs the rest of the job.
HARD_DELETE Tasks to delete rows from the target table based on information in the primary key table. Completes tasks that were not completed, then runs the rest of the job.
COPY_STATISTICS Tasks to copy statistics. Completes tasks that were not completed, then runs the rest of the job.
MOVE_JOURNAL_DATA Teradata ARC tasks to copy journal data.
  • Removes any remaining HUT locks.
  • RE-transfers all of the data for tables that did not have journal data completely transferred.
  • Runs the rest of the job.
ROW_COUNT_VALIDATION Number of copied rows for each table, ensuring rows in source and target tables match. Normally the last step of a job. Completes tasks that were not completed, then runs the rest of the job.

Additional Information

  • The restart feature does not contain any logic to resolve the root issue of why the job failed. Resolve such issues before restarting the job.
  • For jobs using Teradata ARC and its online archiving feature, if a job fails during the MOVE_DATA_STEP, running the restart command causes the online archive to be restarted. When completed, the target table reflects the condition of the source table at the point-in-time when the job was restarted and not at the point-in-time when the job was originally started.
  • When performing restarts, Data Mover does not gather any new information about the source or target, but runs the remainder of the job as originally intended. Data Mover does not adapt the restart job to any changes that might have occurred since the job was originally created. In some cases, it might be necessary to run the cleanup command and create a new job if the original job plan is out of date.
  • If the job uses Teradata ARC and fails in the MOVE_TABLE_DATA or MOVE_JOURNAL_DATA steps, the original Teradata ARC scripts are regenerated to copy only the uncompleted objects. If the Teradata ARC scripts contain user-added changes, these changes are not carried over to the restart Teradata ARC scripts.
  • When a job is restarted, the status command output reflects only the status of the work being done for the restart job.