The command task

The command task is used to execute shell scripts or standalone shell commands. You can define one or more commands or scripts in a command task. If you define multiple command or scripts in the same command task, the task executes the commands in a sequence.

You can define Unix/Perl commands for Unix servers or DOS commands for Windows servers. If your Informatica server is installed on a Unix operating system, you will be able to execute Unix commands. If the Informatica server is installed on Windows, you can use DOS commands.

Creating a command task

To create a command task in Workflow Manager or Task Developer, perform the following steps:

  1. In Workflow Manager or Task Developer, navigate to Tasks | Create (refer to the screenshot shown in the Creating a Session task section).
  2. From the list of tasks, select the Command task and specify the name of the command task, which is cmd_TASK_NAME. For our reference, we are using the command task name as cmd_COPY_FILE. Click on Create, and then click on Done.
    Creating a command task

    The task appears in Workflow Manager or Task Developer. Use the link task to connect the start task to the command task.

    Creating a command task
  3. Double-click on the command task to open the task in the edit view. Click on Commands.
    Creating a command task

    Add a new command by clicking on the Add a new Command option, as shown in the preceding screenshot. In the Name column, enter the name of the command. For our reference, we are using COPY_FILE as the command name.

  4. Click on the edit button to open Command Editor and write the command that you wish to execute. If you wish to execute Unix scripts, write the Unix script's path and name, otherwise simply define the Unix command. Click on OK to close the edit view.
    Creating a command task

    A sample Windows command is indicated in the following screenshot:

    Creating a command task
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset