Example: Running Commands Before and After Running a Mapping
Example: Running Commands Before and After Running a Mapping
You can develop a workflow that runs commands to perform steps before and after a mapping runs. For example, you might configure a Command task before a Mapping task to drop indexes on the mapping target before the mapping runs. You might configure a Command task after the Mapping task to recreate the indexes when the mapping completes.
The following figure shows a workflow that runs a command, runs a mapping, runs another command, and sends an email notifying users of the status of the workflow:
Parameter files provide you with the flexibility to change the parameter values each time you run a workflow. You can use the following parameters in this workflow:
Workflow parameter that represents the command that the first Command task runs.
Mapping parameter that represents the connection to the source for the mapping.
Mapping parameter that represents the connection to the target for the mapping.
Workflow parameter that represents the command that the second Command task runs.
Workflow parameter that represents the email address that the Notification task sends an email to.
Define the values of the parameters in a parameter file. Specify the parameter file when you run the workflow. You can run the workflow with different parameter files to run different commands, to connect the mapping to a different source or target, or to send an email to different users.