Re-Keying Surrogate Key For Dimension & Fact Tables. Need, Impact and Fix
The Informatica PowerCenter Workflow Manager contains many types of tasks to help you build workflows and worklets. You can create reusable tasks in the Task Developer. Or, create and add tasks in the Workflow or Worklet Designer as you develop the workflow. In this article lets see very commonly used Tasks for Workflow or Worklet development.

Background

Lets Consider the scenarion.

People, who are authorized to receive the session status, get an email, once the session has completed. The email gives details of number of rows loaded, rejected, time taken to complete, etc. The workflow should also cleanup the reject files created during a Workflow run.

Solution

  1. Create an Email task and place it in a Workflow
  2. A Command Task can be configured to specify shell or DOS commands, to delete reject files, copy a file, or archive target files.
  3. Use the Command Task to delete reject files.

Workflow Layout

Below is the completed workflow layout.
Tasks and Task Developer in  Informatica PowerCenter Workflow Manager

I. Create an Email Task

  1. Create an Email Task in the Task Developer.
  2. Enter the name for the Email Task as On_Success_Mail.
  3. Double-click on the email task. Click on the General tab, enter the description for the task as shown below.
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  4. Select the Properties tab and enter the Email User Name and Email Subject details.
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  5. Create one more Email task, give the name as On_Failure_Mail and set its properties.

II. Configure the Workflow

  1. Switch to the Workflow Designer and drag the wf_OrderListing_x Workflow created in Prior Article.
  2. Double-click on the Session Task s_OrderList_x.
  3. Click on the Components tab.
  4. Click On Success E-Mail option; from the drop down list select Reusable. 
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  5. Click on the image icon and select On_Success_Mail from the drop down list. 
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  6. Click on the icon image shown highlighted in the figure below.
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  7. Enter the email text. Here you can select any post-session built-in Email variables, useful for including important session information.
  8. The reusable Email task for On Failure E-Mail. Enter the details required.
    Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  9. Click OK.
Note: The concerned people will receive an email regarding the status of the Workflow, subject to mail server configuration.

III. Switch to Task Developer

  1. Create a Command task or click on the image icon on the Tasks toolbar.Tasks and Task Developer in  Informatica PowerCenter Workflow Manager
  2. Edit the Task.
  3. In the Commands tab, click on the image icon. Enter a name for the command as DeleteFiles, click on image to enter the instructions in the command.
  4. Tasks and Task Developer in  Informatica PowerCenter Workflow ManagerEnter the command as shown below.
Tasks and Task Developer in  Informatica PowerCenter Workflow Manager

Note: The command can be any valid UNIX command or shell script for UNIX servers, or, any valid DOS or batch file for Windows servers.

IV. Configure the Workflow

  1. Open the Workflow wf_OrderListing_x create in Prior Article.
  2. Link the session task s_OrderList_x to Command_Delete_x.
  3. Run the Workflow.
  4. Verify the results.
Note: The commands specified in the Command Task are executed on the Informatica Server. To verify the execution of the commands given in the Command Task you need to have privileges to login to the Informatica Server and view the BadFiles directory that has all the reject files.

Hope you enjoyed this tutorial, Please let us know if you have any difficulties in trying out these exercise.

Share with your friends

Readers Comments