• Home   /  
  • Archive by category "1"

Assignment Tasks In Informatica Jobs

Informatica jobs let you start predefined workflows on Informatica PowerCenter. In Informatica, jobs are known as workflows. A workflow can contain multiple tasks. You can start the workflow from the beginning of the workflow or from a specified task. You can also start a workflow instance.

Note:

  • To run these jobs, your system requires CA WA Agent for Linux or Windows and CA WA Agent for Informatica.

  • Due to a known issue in Informatica, you cannot run workflow instances in parallel.

Informatica PowerCenter provides an environment that lets you load data into a centralized location, such as a data warehouse or operational data store (ODS). You can extract data from multiple sources, transform the data according to business logic you build in the client application, and load the transformed data into file and relational targets.

Define an Informatica Job

You can define an Informatica job to start a predefined workflow on Informatica PowerCenter. You can start the workflow from the beginning of the workflow or from a specified task. You can also start a workflow instance.

Follow these steps:

  1. Create an Informatica (INFORMATICA) job in either Quick Edit or Application Editor.
    The Properties section for the Informatica job appears.

  2. Specify the following required properties:

    • Name
      Defines the name of the job that you want to schedule. 
      Limits: Up to 64 characters; valid characters are a-z, A-Z, 0-9, period (.), underscore (_), hyphen (-), and pound (#); do not include embedded spaces or tabs
    • Send to machine
      Specifies the name of the machine on which the job runs.
    • Folder name
      Specifies the Informatica PowerCenter repository folder name where the specified workflow resides. You can obtain this value from the Informatica server. 
      Limits: Up to 79 characters.
    • Workflow name
      Specifies the name of the Informatica PowerCenter workflow to be started.
      Limits: Up to 79 characters. 

      Note: Click the icon to search for an Informatica workflow.

  3. (Optional) Specify optional Informatica Properties.
  4. (Optional) Specify common properties that apply to all job types.
  5. Commit the job.
    The Informatica job is defined.

Informatica Job Examples

Example: Start a Task in a Workflow on Informatica PowerCenter

This example starts the copy task in the WF_1 workflow on the Informatica PowerCenter. The workflow is started from the copy task. Based on the status of tasks, the workflow status is reported.

Follow these steps:

  1. Create an Informatica job.
  2. Enter the following properties:
    • Name -- INFORMATICA
    • Send to machine -- 160_infor
    • Folder name – FSTL
    • Workflow name – WF_1
    • Task name – copy
    • Pass when successful – 1
  3. Commit the job.

Example: Process a Parameter File in a Workflow

This example processes the wf2.prm parameter file on the Informatica server in the WF_2 workflow. Based on the status of tasks, the workflow status is reported.

The wf2.prm parameter file includes symbolic variables that override the default log directory and file name:

;Workflow Parameters [INFAPLUGIN.WF:wf_3] ;Session parameters $PMSessionLogFile=wf3.log $PMSessionLogDir=C:\Infa\Log ;mapping parameters

Follow these steps:

  1. Create an Informatica job.
  2. Enter the following properties:
    • Name -- INFORMATICA
    • Send to machine -- 160_infor
    • Folder name – FSTL
    • Workflow name – WF_2
    • Parameter file – C:\Infa\wf2.prm
    • Pass when successful – 1
  3. Commit the job.

Informatica Properties

The Informatica category includes the following properties: 

  • Folder name
    Specifies the Informatica PowerCenter repository folder name where the specified workflow resides. You can obtain this value from the Informatica server. 
    Limits: Up to 79 characters.
  • Workflow name
    Specifies the name of the Informatica PowerCenter workflow to be started.
    Limits: Up to 79 characters. 

    Note: Click the icon to search for an Informatica workflow.

  • Informatica target
    (Optional) Specifies the name of the Informatica target (infaTarget). The corresponding directory (install_dir/config/informatica/infaTarget) stored on the agent contains the properties for connecting to the Informatica server and one or more database repositories.
    Limits: Up to 128 characters.

    Note: If you do not specify any value in the Informatica target field, the agent uses the default value specified in the informatica.server.target.default parameter in the agentparm.txt file.

  • Repository name
    (Optional) Specifies the name of the repository that is created on the Informatica server. The repository can be obtained from the Informatica Administrative console. The corresponding property file (repositoryName.properties) that is stored on the agent contains the database connection properties for a specified Informatica target (infaTarget).
    Limits: Up to 128 characters

    Note: If you do not specify any value in the Repository name field, the agent uses the default value specified in the informatica.repository.name.default parameter in the informatica.properties file stored on the agent.

  • Informatica domain
    (Optional) Specifies the name of the LDAP security domain that is configured with the Informatica Server. Specify this attribute in your job definition, to authenticate the user against the specified LDAP security domain.
    Limits: Up to 80 characters 

  • Informatica user
    (Optional) Specifies the Informatica server user name. 
    Limits: Up to 145 characters

    Notes:

    • If you specify the Informatica user in your job definition, you must set the password that is associated with the informatica user using the autosys_secure command.
    • If you do not specify any value in the Informatica user field, the agent uses the default value that is specified in the informatica.user.id.default parameter in the informatica.properties file that is stored on the agent.
  • Workflow instance
    (Optional) Specifies the name of the workflow instance to be started. When the task name and the workflow instance name are specified, the workflow instance is started from the specified task. When the task name is not specified, the workflow instance starts from the beginning. If the instance name is not specified, the workflow is started.
    Limits: Up to 79 characters

    Note: Before you specify the workflow instance name, you must specify the workflow using the Workflow name field.

  • Task name
    (Optional) Specifies the name of the task to start the workflow from. If the task name is not specified, the workflow starts from the beginning. 
    Limits: Up to 79 characters.

    Note: Click the icon to search for a task in an Informatica workflow.

  • Parameter file
    (Optional) Specifies the path and name of a parameter file on the Informatica server. Informatica PowerCenter processes the parameter file when running a workflow. The parameter file contains values for symbolic variables and must adhere to the format that Informatica PowerCenter expects. A property value that is set in a parameter file overrides a value for this property that is set at the session level or elsewhere.
    Limits: Up to 256 characters
  • Pass when successful
    (Optional) Specifies whether the status of the workflow is retrieved directly from Informatica or inferred depending on the successful execution of all the tasks.

    • 0
      Returns the workflow status as reported by Informatica. In Informatica, a workflow can succeed even if one or more tasks in the workflow fail.

    • 1
      Returns the workflow status based on the status of tasks in the Informatica workflow. If all tasks in the workflow complete successfully, the agent reports the status of the workflow as successful. If any task in the workflow fails, the agent reports the status of the workflow as failed.
      Default: 0

    Note: If you do not specify any value in the Pass when successful field, the agent uses the default value that is specified in the informatica.passonsuccessonly.default parameter in the agentparm.txt file.

Search for an Informatica Workflow

You can use the Search Informatica Workflows dialog to search for and select a workflow that is defined on Informatica PowerCenter. 

Follow these steps:

  1. Click the  icon next to the Workflow name field in the Properties section for the Informatica job.
    The Search Informatica Workflows dialog opens.

    Note: The fields in this dialog are populated with the information that is specified in the Properties section for the Informatica job.

  2. (Optional) Specify the information in the Informatica Server Info section.

    Note: The fields in this section are populated with the information that is specified in the Properties section for the Informatica job, if any.

  3. (Optional) Edit the folder name in the Folder name field.

  4. (Optional) Specify the filter criteria in the following field:
    • Matching Pattern
      Specifies the matching pattern string that is used to retrieve the names of workflows. Only workflows whose names contain the search pattern are displayed. % is the only wildcard character that is supported for the pattern matching.
      Limits: Up to 79 characters
      Example: If you specify "A%ab%" as the matching pattern, all the workflows whose names start with A and contain ab in the middle or at the end are displayed. If you specify "%file%" as the matching pattern, all the workflows whose names contain file are displayed, for example: file_task, X_file_Task and T_file. If you specify %inf%_% as the matching pattern, all workflows whose names contains INF and underscore (_) are displayed.

      Note: If you do not specify a matching pattern, all workflows that belong to the specified repository folder are displayed.

  5. Click Go.
    The Workflows table is populated with the list of workflows that meet the matching pattern string.

    Note: You can sort the data in the table by clicking on a table column heading.

  6. Select a workflow and click Select Workflow to specify the workflow name in the job definition.
    The selected workflow details and the Informatica properties are populated in the Properties section for the Informatica job.

Search for Informatica Tasks in an Informatica Workflow

You can specify the Folder Name and Workflow Name as filtering criteria and use the Search Informatica Tasks dialog to retrieve the workflow tasks that are defined in an Informatica Workflow.

Note: You must define the workflow name before you start searching for a workflow task.


Follow these steps:

  1. Specify Send to machine (Agent name) and Folder name in the Properties section for the Informatica job.
  2. Complete the steps in the Search for an Informatica Workflow section.
  3. Click the  icon next to the Task name field.
    The Browse Informatica Tasks dialog displays a list of workflow tasks in the selected Informatica workflow.

    Note: You can sort the data in the table by clicking on a table column heading.

  4. (Optional) Select a task and click Task Details to display the details of the selected task in a tabular format.
  5. (Optional) Select a task and click Object Hierarchy to display the hierarchy of the selected task within the workflow in a graphical format.
    Note: The Object Hierarchy button does not display in the Internet Explorer and Microsoft Edge browsers.
  6. Select a task and click Select Task to specify the task name in the job definition.
    The selected task name is set on the Basic page of the job definition.

View Workflow Details

You can now view the Informatica workflow details in a tabular or graphical format.

Follow these steps:

  1. Create an Informatica (INFORMATICA) job in either Quick Edit or Application Editor.
    The Properties section for the Informatica job appears.

  2. Specify the Folder name and click the icon to search for an Informatica workflow.
    The Search Informatica Workflows dialog opens.

  3. (Optional) Specify the filter criteria.

  4. Click Go.
    The Search Results display a list of workflows.

  5. (Optional) Select a workflow and click Workflow Details to display the sequence of tasks for the selected workflow in a tabular format.
    1. The Workflow Details window displays the Workflow Name, Workflow ID, and the following Task Sequences:

      • FromInstance
      • ToInstance
      • Link
  6. (Optional) Select a workflow and click Object Hierarchy to display the hierarchy of all tasks within the selected workflow in a graphical format.
    Note: The Object Hierarchy button does not display in the Internet Explorer and Microsoft Edge browsers. 

  7. Click OK to return to the Search Informatica Workflows dialog.

View Workflow Task Details

You can now view the Informatica workflow task details in a tabular or graphical format.

Follow these steps:

  1. Select the task in the Browse Informatica tasks dialog and click Task Details.
    The Task Details window displays the Task Instance Name and the following properties' Parameters and Values in a tabular format:
    • Task Type
    • Mapping Name
      Note: This parameter is displayed when the selected Task Type is SESSION.
    • Folder Id
    • Folder Name
    • Workflow Id
    • Workflow Name
    • Task Instance Id
    • Task Instance Name
  2. Click Close to close the Task Details window.
  3. (Optional) Select a task and click Object Hierarchy to display the hierarchy of the selected task within the workflow in a graphical format.
    Note: The Object Hierarchy button does not display in the Internet Explorer and Microsoft Edge browsers. 
  4. Click OK to close the window.

View Workflow Status

You can view the workflow status of an Informatica job.

Follow these steps:

  1. Select Quick View.
  2. Select the Server from the drop-down, specify the Name, and click Go.
    The Search Results are displayed.
  3. Click the Get Workflow Status icon under Actions.

    Note: The Actions column is displayed only after a job is run. If the job is not yet run, you can see no information in the Start Time and End Time columns and the Actions column is not displayed.

    The Informatica Workflow status with the following information is displayed.
          Workflow Id
                Specifies the workflow id created with the job.
          Workflow Run Id
                Specifies the run id of the workflow.
          Workflow Status
                Specifies the workflow status. Example: succeeded

View Workflow Run Details

You can view the workflow run details of an Informatica job.

Note: Only the latest run details are displayed.

Follow these steps:

  1. Select Quick View.
  2. Select the Server from the drop-down, specify the Name, and click Go.
    The Search Results are displayed.
  3. Click the Get Workflow Run Details icon under Actions.

    Note: The Actions column is displayed only after a job is run.

    The Informatica Workflow Run Details window displays the workflow and tasks details in a tabular format.

  4. Click OK to close the window. 

Restart an Informatica Workflow

You can restart a failed workflow or its instance from the point of failure or from the beginning in recovery mode. For example, if a workflow is terminated abnormally, you can restart the workflow.

Note: To restart a job, it must be in Failed state.

Follow these steps:

  1. Select Quick View.
  2. Select the Server from the drop-down, specify the Name, and click Go.
    The Search Results are displayed.
  3. Click the Restart icon under the Actions column.

    Note: You can also restart a workflow from Job Flow or Send Events.

    The Restart Workflow dialog opens.

  4. (Optional) Select a SessionTask that you want to restart the workflow from.

    Note: To restart a workflow or its instance from a point of failure, select a session task. If a session task is not selected, the workflow is restarted from the beginning in recovery mode.

  5. Click Restart.
    The server restarts the specified workflow or its instance in recovery mode from the specified session task or from the beginning.

You can also restart an Informatica workflow from the Dashboard tab.

Follow these steps:

  1. Select Dashboard, enter Name under the Jobs pane, and click Go.
    The search results are displayed. 
  2. Right-click on the job and select Restart.

    Note: You can also restart a workflow from Send Events.

  3. (Optional) Select a SessionTask that you want to restart the workflow from.

    Note: To restart a workflow or its instance from a point of failure, select a session task. If a session task is not selected, the workflow is restarted from the beginning in recovery mode.

  4. Click Restart.
    The server restarts the specified workflow or its instance in recovery mode from the specified session task or from the beginning.

You can also restart an Informatica workflow from the Monitoring tab.

Follow these steps:

  1. Select Monitoring, Views.
    Select a job from the displayed list.

  2. Right-click on the job and select Restart.

    Note:

    You can also search for a job from the Jobs and Alerts tab.

    You can also restart a workflow from Send Events, and Flow tab.

  3. (Optional) Select a SessionTask that you want to restart the workflow from.

    Note: To restart a workflow or its instance from a point of failure, select a session task. If a session task is not selected, the workflow is restarted from the beginning in recovery mode.

  4. Click Restart.
    The server restarts the specified workflow or its instance in recovery mode from the specified session task or from the beginning. 

Retrieve the Log for an Informatica Workflow

You can retrieve the log of a completed or failed Informatica workflow or its sessions. The workflow log details include the workflow run ID, log type (workflow or session), log output, and so on.

Follow these steps:

  1. Select Quick View.
  2. Select the Server from the drop-down, specify the Name, and click Go.
    The Search Results are displayed.
  3. Select the required Job.

  4. Expand Job Runs, select the required Job Run.

  5. Select Job Workflow Log against Action and click Go.
    The Informatica Workflow Log dialog opens.

  6. (Optional) Select the Session Name from the drop-down list.

  7. Click OK.
    The Job Workflow Log section displays the log details for the specified workflow or session.

What is Workflow?

Workflow is a group of instructions/commands to the integrations service in Informatica. The integration service is an entity which reads workflow information from the repository, fetches data from sources and after performing transformation loads it into the target.

Workflow - It defines how to run tasks like session task, command task, email task, etc.

To create a workflow

  1. You first need to create tasks
  2. And then add those tasks to the workflow.

A Workflow is like an empty container, which has the capacity to store an object you want to execute. You add tasks to the workflow that you want to execute. In this tutorial, we are going to do following things in workflow.

Workflow execution can be done in two ways

  • Sequence : Tasks execute in the order in which they are defined
  • Event based : Tasks gets executed based on the event conditions.

In this Tutorial - you will learn

How to open Workflow Manager

Step1 – In the Informatica Designer, Click on the Workflow manager icon

Step 2 – This will open a window of Workflow Manager. Then, in the workflow Manager.

  1. We are going to connect to repository "guru99", so double click on the folder to connect.
  2. Enter user name and password then select "Connect Button".

Step 3- In the workflow manager.

  1. Right click on the folder
  2. In the pop up menu, select open option

This will open up the workspace of Workflow manager.

How to Create Connections for Workflow Manager

To execute any task in workflow manager, you need to create connections. By using these connections, Integration Service connects to different objects.

For Example, in your mapping if you have source table in oracle database, then you will need oracle connection so that integration service can connect to the oracle database to fetch the source data.

Following type of connections can be created in workflow manager.

  • Relational Connection
  • Ftp Connection
  • Queue
  • Application

The choice of connection you will create, will depend on the type of source and target systems you want to connect. More often, you would be using relational connections.

To Create a Relational Connection

Step 1 – In Workflow Manager

  1. Click on the Connection menu
  2. Select Relational Option

Step 2 – In the pop up window

  1. Select Oracle in type
  2. Click on the new button

Step 3 – In the new window of connection object definition

  1. Enter Connection Name (New Name-guru99)
  2. Enter username
  3. Enter password
  4. Enter connection string
  5. Leave other settings as default and Select OK button

Step 4 – You will return on the previous window. Click on the close button.

Now you are set with the relational connection in workflow manager.

Components of Workflow manager

There are three component tools of workflow manager that helps in creating various objects in workflow manager. These tools are

  • Task Developer
  • Worklet Designer
  • Workflow Designer

Task Developer – Task developer is a tool with the help of which you can create reusable objects. Reusable object in workflow manager are objects which can be reused in multiple workflows. For Example, if you have created a command task in task developer, then you can reuse this task in any number of workflows.

The role of Workflow designer is to execute the tasks those are added in it. You can add any no of tasks in a workflow.

You can create three types of reusable tasks in task developer.

  • Command task
  • Session task
  • Email task

Command task – A command task is used to execute different windows/unix commands during the execution of the workflow. You can create command task to execute various command based tasks. With help of this task you can execute commands to create files/folders, to delete files/folders, to do ftp of files etc.

Session Task - A session task in Informatica is required to run a mapping.

  • Without a session task, you cannot execute or run a mapping
  • A session task can execute only a single mapping. So, there is a one to one relationship between a mapping and a session
  • A session task is an object with the help of which informatica gets to know how and where to execute a mapping and at which time
  • Sessions cannot be executed independently, a session must be added to a workflow
  • In session object cache properties can be configured and also advanced performance optimization configuration.

Email task - With the help of email task you can send email to defined recipients when the Integration Service runs a workflow. For example, if you want to monitor how long a session takes to complete, you can configure the session to send an email containing the details of session start and end time. Or, if you want the Integration Service to notify you when a workflow completes/fails, you can configure the email task for the same.

How to create command task

Step 1- To create a command task we are going to use Task Developer. In Workflow Manager, open the task developer by clicking on tab "task developer" from the menu.

Step 2 – Once task developer is opened up, follow these steps

  1. Select Tasks menu
  2. Select Create option

Step 3 – In the create task window

  1. Select command as type of task to create
  2. Enter task name
  3. Select create button

This will create command task folder. Now you have to configure the task to add command in it, that we will see in next step.

Step 4 – To configure the task, double click on the command task icon and it will open an "edit task window". On the new edit task window

  1. Select the commands menu
  2. Click on the add new command icon
  3. Enter command name
  4. Click on the command icon to add command text

This will open a command editor box.

Step 5 – On the command editor box, enter the command "mkdir C:\guru99" (this is the windows command to create a folder named "guru99") and select OK.

Afther this step you will return to the edit tasks window and you will be able to see the command you added in to the command text box.

Step 6 – Click OK on the edit task window,

The command task will be created in the task developer under "Guru99" repository.

Note – use ctrl+s shortcut to save the changes in repository

How to create workflow to execute command task

To execute command taks you have to switch on to workflow designer. A workflow designer is a parent or container object in which you can add multiple tasks and when workflow is executed, all the added tasks will execute. To create a workflow

Step 1 – Open the workflow designer by clicking on workflow designer menu

Step 2 – In workflow designer

  1. Select workflows menu
  2. Select create option

Step 3 – In create workflow window

  1. Enter workflow name
  2. Select OK Button ( leave other options as default)

This will create the workflow.

Naming Convention - Workflow names are prefixed with using 'wkf_', if you have a session named 's_m_employee_detail' then workflow for the same can be named as 'wkf_s_m_employee_detail'.

When you create a workflow, it does not consist of any tasks. So, to execute any task in a workflow you have to add task in it.

Step 4 - To add command task that we have created in Task developer to the workflow desinger

  1. In the navigator tree, expand the tasks folder
  2. Drag and drop the command task to workflow designer

Step 5 - Select the "link task option" from the toolbox from the top menu. (The link task option links various tasks in a workflow to the start task, so that the order of execution of tasks can be defined).

Step 6 – Once you select the link task icon, it will allow you to drag the link between start task and command task. Now select the start task and drag a link to the command task.

Now you are ready with the workflow having a command task to be executed.

How to execute workflow

Step 1 – To execute the workflow

  1. Select workflows option from the menu
  2. Select start workflow option

This will open workflow monitor window and executes the workflow

Once the workflow is executed, it will execute the command task to create a folder (guru99 folder) in the defined directory.

Session Task

A session task in Informatica is required to run a mapping.

Without a session task, you cannot execute or run a mapping and a session task can execute only a single mapping. So, there is a one to one relationship between a mapping and a session. A session task is an object with the help of which Informatica gets to know how and where to execute a mapping and at which time. Sessions cannot be executed independently, a session must be added to a workflow. In session object cache properties can be configured and also advanced performance optimization configuration.

How to create a session task.

In this exercise you will create a session task for the mapping "m_emp_emp_target" which you created in the previous article.

Step1 – Open Workflow manager and open task developer

Step 2 – Now once the task developer opens, in the workflow manager go to main menu

  1. Click on task menu
  2. Select create option

This will open a new window "Create Task"

Step 3 – In the create task window

  1. Select session task as type of task.
  2. Enter name of task.
  3. Click create button

Step 4 – A window for selecting the mapping will appear. Select the mapping which you want to associate with this session, for this example select "m_emp_emp_target" mapping and click OK Button.

Step 5 – After that, click on "Done" button

Session object will appear in the task developer

Step 6 – In this step you will create a workflow for the session task. Click on the workflow designer icon.

Step 7 – In the workflow designer tool

  1. Click on workflow menu
  2. Select create option

Step 8 – In the create workflow window

  1. Enter workflow name
  2. Select OK. ( leave other properties as default, no need to change any properties)

In workflow manager a start task will appear, it's a starting point of execution of workflow.

Step 9 – In workflow manager

  1. Expand the sessions folder under navigation tree.
  2. Drag and drop the session you created in the workflow manager workspace.

Step 10 - Click on the link task option in the tool box.

Step 11 - Link the start task and session task using the link.

Step 12 – Double click on the session object in wokflow manager. It will open a task window to modify the task properties.

Step 13 – In the edit task window

  1. Select mapping tab
  2. Select connection property
  3. Assign the connection to source and target, the connection which we created in early steps.
  4. Select OK Button

Now your configuration of workflow is complete, and you can execute the workflow.

How to add multiple tasks to a start task

The start task is a starting point for the execution of workflow. There are two ways of linking multiple tasks to a start task.

  1. Parallel
  2. Serial

In parallel linking the tasks are linked directly to the start task and all tasks start executing in parallel at same time.

How to add tasks in parallel

Step 1 – In the workflow manager, open the workflow "wkf_run_command"

Step 2 – In the workflow, add session task "s_m_emp_emp_target". ( by selecting session and then drag and drop)

Step 3 – Select the link task option from the toolbox

Step 4 - link the session task to the start task (by clicking on start taks, holding the click and connecting to session task)

After linking the session task, the workflow will look like this.

Step 5 – Start the workflow and monitor in the workflow monitor.

How to add tasks in serial mode

But before we add tasks in serial mode, we have to delete the task that we added to demonstrate parallel execution of task. For that

Step 1 – Open the workflow "w.kf_run_command"

  1. Select the link to the session task.
  2. Select edit option in the menu
  3. Select delete option

Step 2 – Confirmation dialogue box will appear in a window, select yes option

The link between the start task and session task will be removed.

Step 3 – Now again go to top menu and select the link task option from the toolbox

Step 4 – link the session task to the command task

After linking the workflow will look like this

Step 5 - To make the visual appearance of workflow more clear

  1. Right click on wokspace of workflow
  2. Select arrange menu
  3. Select Horizontal option

If you start the workflow the command task will execute first and after its execution, session task will start.

Workflow Variable

Workflow variables allows different tasks in a workflow to exchange information with each other and also allows tasks to access certain properties of other tasks in a workflow. For example, to get the current date you can use the inbuilt variable "sysdate".

Most common scenario is when you have multiple tasks in a workflow and in one task you access the variable of another task. For example, if you have two tasks in a workflow and the requirement is to execute the second task only when first task is executed successfully. You can implement such scenario using predefined variable in the workflow.

Implementing the scenario

We had a workflow "wkf_run_command" having tasks added in serial mode. Now we will add a condition to the link between session task and command task, so that, only after the success of command task the session task will be executed.

Step 1 - Open the workflow "wkf_run_command"

Step 2 - Double click on the link between session and command task

An Expression window will appear

Step 3 – Double click the status variable under "cmd_create_folder" menu. A variable "$cmd_create_folder.status" will appear in the editor window on right side.

Step 4 - Now we will set the variable "$cmd_create_folder.status" condition to succeeded status . which means when the previous tasks is executed and the execution was success, then only execute the next session task.

  1. Change the variable to "$cmd_create_folder.status=SUCCEEDED" value.
  2. Click OK Button

The workflow will look like this

When you execute this workflow, the command task executes first and only when it succeeds then only the session task will get executed.

Workflow Parameter

Workflow parameters are those values which remain constant throughout the run. once their value is assigned it remains same. Parameters can be used in workflow properties and their values can be defined in parameter files. For example, instead of using hard coded connection value you can use a parameter/variable in the connection name and value can be defined in the parameter file.

Parameter files are the files in which we define the values of mapping/workflow variables or parameters. There files have the extension of ".par". As a general standard a parameter file is created for a workflow.

Advantages of Parameter file

  • Helps in migration of code from one environment to other
  • Alows easy debugging and testing
  • Values can be modified with ease without change in code

Structure of parameter file

The structure of parameter file

  • [folder_name.WF:Workflow_name]
  • $Parameter_name=Parameter_value

Folder_name is the name of repository folder, workflow name is the name of workflow for which you are creating the parameter file.

We will be creating a parameter file for the database connection "guru99" which we assigned in our early sessions for sources and targets.

How to create parameter file

Step 1 – Create a new empty file (notepad file)

Step 2 – In the file enter text as shown in figure

Step 3 – Save the file under a folder guru99 at the location "C:\guru99" as "wkf_run_command.par"

In the file we have created a parameter "$DBConnection_SRC", we will assign the same to a connection in our workflow.

Step 4- Open the workflow "wkf_run_command"

  1. Select workflows menu
  2. Select edit option

Step 5 – This will open up edit workflow window, in this window

  1. Go to properties tab menu
  2. Enter the parameter file name as "c:\guru99\wkf_run_command.par"
  3. Select OK Button

Now we are done with defining the parameter file content and point it to a workflow.

Next step is to use the parameter in session.

Step 6 - In workflow double click on the session "s_m_emp_emp_target", then

  1. Select mappings tab menu
  2. Select connection property in the left panel
  3. Click on the target connection, which is hardcoded now as "guru99"

Step 7 - A connection browser window will appear, in that window

  1. Select the option to use connection variable
  2. Enter connection variable name as "$DBConnection_SRC"
  3. Select Ok Button

Step 8 – In the edit task window connection variable will appear for the target, Select OK button in the edit task window.

Now we are done with creating parameter for a connection and assigning its value to parameter file.

When we execute the workflow, the workflow picks the parameter file looks for the value of its paramters/variables in the parameter file and takes those values.

 

One thought on “Assignment Tasks In Informatica Jobs

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *