You can run preprocessing and postprocessing commands to perform additional jobs. The task runs preprocessing commands before it reads the source. It runs postprocessing commands after it writes to the target.
You can use the following types of commands:
•SQL commands. Use SQL commands to perform database tasks.
•Operating system commands. Use shell and DOS commands to perform operating system tasks.
If any command in the preprocessing or postprocessing scripts fail, the task fails.
Preprocessing and postprocessing SQL commands
You can run SQL commands before or after a task. For example, you can use SQL commands to drop indexes on the target before the task runs, and then recreate them when the task completes. Data Integration does not validate the SQL.
Use the following rules and guidelines when creating the SQL commands:
•Use any command that is valid for the database type. However, Data Integration does not allow nested comments, even if the database allows them.
•Use a semicolon (;) to separate multiple statements. Data Integration issues a commit after each statement.
•Data Integration ignores semicolons within comments. If you need to use a semicolon outside of comments, you can escape it with a backslash (\).
Preprocessing and postprocessing operating system commands
Data Integration can perform operating system commands before or after the task runs. For example, use a preprocessing shell command to archive a copy of the target flat file before the task runs on a UNIX machine.
You can use the following types of operating system commands:
•UNIX. Any valid UNIX command or shell script.
•Windows. Any valid DOS or batch file.
Enter multiple preprocessing or postprocessing commands as a single line without spaces.
If the Secure Agent is on a Windows machine, separate commands with an ampersand (&). If the Secure Agent is on a Linux machine, separate commands with a semicolon (;).