Informatica Sessions & Mappings
Posted by Superadmin on June 29 2022 14:58:23

Informatica Sessions & Mappings

 

 

 

This Informatica tutorial section explains the creation of Informatics Sessions, Mapping, and Workflow. This section of Informatica tutorial is the most important section because of its reusability in all the transformations.

  1. Target Designer
  2. Create Target table using Source Definition
  3. Create New Target Table
  4. How to Create Mapping
  5. Create Session
  6. How to Create Reusable Session
  7. Create Workflow
  8. Creating Workflow using Wizard
  9. Command Task
  10. Event Wait Task

 

 

Target Designer in Informatica

To perform Extraction, Transformation, and Load (ETL operations), we require Source Data, Target tables, and Transformations (if needed). The Target Designer in Informatica allows us to create our destination tables, Modify already existing target definitions.

Informatica Target Designer also allows us to Import target definitions from various sources includes Flat Files, Relational Databases, XML definitions, Excel Worksheets, etc.  

 

Target Designer in Informatica

Before we start doing anything, First connect to the repository service. To connect with the Repository service, we have to provide the Admin Console credentials. So, please enter the Username and Password and click on the Connect button.

TIP: Here, you have to provide the Admin Console Username and password that you specified while installing the Informatica Server.

Connect to repository admin Console 3

Once you connected successfully, Please navigate to Tools menu in Menu Bar. The following screenshot will show the list of available tools inside the PowerCenter Designer. In this article, we are explaining about the Target Designer in Informatica. So, please select the Target Designer option.  

 

PowerCenter Designer Tools 4

Once you select the Target Designer option, we will be in the Target Designer screen. The target Menu in the Menu bar will be available only when you are in the Informatica Target Designer section. Otherwise, it will not show.

   Target Designer in Informatica 1

Next, Please navigate to Targets menu in Menu Bar. From the following screenshot, you can observe the list of available targets inside the Informatica PowerCenter Designer. They are

 
  • Import from Database: This option allows us to import destination table(s) from a relational database. Informatica Target designer supports various relational databases, such as Microsoft SQL Server, Oracle, SAP HANA, Sybase, Teradata, etc.
  • Import from File: This option allows us to import target files from flat files which are separated by Delimiter or fixed width.
  • Web Service: The PowerCenter helps us to use web services as target or destination
  • Import from COBOL File: This allows us to export source data to COBOL files.
  • Import XML Definition: This option allows us to import XML definition as a target or destination
  • Create: This option will enable us to create our data-target table from scratch.
  • Import from PeopleSoft: This option will enable us to use PeopleSoft as a target or destination.
  • Create Cube: This option allows us to create a multidimensional cube.
Target Designer in Informatica 2

 

 

Create Informatica Target table using Source Definition

In this article, we will show you how to create an Informatica target table using the source definition that exists in the Sources folder. And how to use it as the destination/target table for the transformed data with an example.

For example, If we want to copy or use the source definition as your target definition, this will be the best bet for you.  

 

Create Informatica Target table using Source Definition

Before we start doing anything, First connect to Informatica repository service with your Admin credentials and then Navigate to Target Designer. Please refer to Target Designer article to understand the Target Designer screen. From the below Informatica screenshot, you can observe that we are in the Target Designer.

TIP: Target Menu in the Menu bar will be available only when you are in the Target Designer section. Otherwise, it won’t show up.

Create Informatica Target table using Source Definition 0

Drag and drop the DimProducts from the Sources subfolder to the Target Designer. The PowerCenter target designer will automatically create an Informatica target table using source definition.  

 

Create Informatica Target table using Source Definition 1

From the below screenshot, under the Targets subfolder, view our newly created target in Informatica and the table definition (Column Names and appropriate data types) inside our workspace.

   Create Informatica Target table using Source Definition 2

Although we copied the DimProducts table from source definition, we may not require all the columns present in that table. To resolve this, we can edit the table by Right-click on the table definition and selecting the Edit.. option from the context menu.

 Create Informatica Target table using Source Definition 3

Once you select the Edit.. option, a new window called Edit tables will open. Within the Table tab, we can rename the table name by clicking the Rename button. From the below screenshot, see we are changing the table name from DimProducts to Target_DimProducts 

Create Informatica Target table using Source Definition 4

To alter or modify the existing table, we have to navigate to Columns Tab. For example,

 

Once editing completed, Click OK to close the Edit tables window

Create Informatica Target table using Source Definition 5

The target tables we created in PowerCenter target designer will exist only in the target designer. If you want to add this table definition to SQL Server, we have to follow the few steps:

  

Step 1: Please navigate to Targets menu in Menu Bar. From the following screenshot, you can observe the list of available targets inside the PowerCenter Designer. In this example, our task is to create an Informatica target table using source definition. So, we are selecting the Generate/Execute SQL.. option.

Create Informatica Target table using Source Definition 6

Step 2: Once you select the Generate/Execute SQL.. option, a new window called Database Object Generationwindow will open. Before we start using these properties, let us see them in detail:

Generate from: Here we have two options: 

Generation options: This section holds multiple options:

Let us see the action behind each button:

    Create Informatica Target table using Source Definition 7

Step 3: From the below screenshot, you can observe that we are selecting Create Table, Create Primary Key, and Create Foreign Key. We are not dropping anything because our database is new and empty.  

 

Create Informatica Target table using Source Definition 8

Step 4: Once you click on the connect.. button, Connect to ODBC Data Source window will be opened to select the existing ODBC connection or to create a new one. Currently, we don’t have any so, we are creating a new one by clicking on the … button.

Create Informatica Target table using Source Definition 9

Step 5: Once you click on the … button, ODBC Data Source Administrator Window will be opened to add a new ODBC connection. If you have any, then please select it from the list. In this example, we are adding a new connection so, Click on the Add button. Once you click on the Add button, Create a New Data Source window will open.

Here we have an option to select the required database from the available list. As we said before, we are using SQL Server. So we are choosing the DataDirect 7.1 SQL Server Wire Protocol for this example.  

 

TIP: Please refer to ODBC Connection to understand the steps in detail.

Create Informatica Target table using Source Definition 10

Step 6: It opens a new pop up window called ODBC SQL Server Legacy Wire Protocol Driver Setup. Here we have to fill the required details to connect with our database.

Once you have done, click the Apply button and then click OK button to close the window 

 

NOTE: Once you fill the required details, It is always advisable to Test your connection using the Test Connection button

Create Informatica Target table using Source Definition 11

Step 7: From the drop-down list, Please select the ODBC connection that we created now.

Create Informatica Target table using Source Definition 12

Step 8: Next, We have to provide the credentials required to connect with the respective database. Here we are providing the Username and password of our Microsoft SQL Server 2014 and owner name as dbo. 

 

Once you fill the details, please click on the connect button to connect with the SQL database. After you connected successfully, click on the Generate and Execute button to generate and execute the SQL file

Create Informatica Target table using Source Definition 13

From the below screenshot, you can observe that we successfully created the Target table inside our Microsoft SQL Server 2014.

Create Informatica Target table using Source Definition 14

 

 

 

 

 

 

 

 

Create Target Table in Informatica

In this article, we will show you how to create a target table in Informatica and use it as the destination/target table for the transformed data with an example. For example, If we don’t have a table structure that matches our requirement, then this option can be beneficial.

How to Create Target Table in Informatica

Before we start to Create Target Table in Informatica, First connect to the repository service with your Admin credentials and then Navigate to Target Designer. 

 

 

Please refer to Target Designer article to understand the Target Designer screen. From the below screenshot, you can observe that we are in the Informatica Target Designer.

TIP: Target Menu in the Menu bar available only when you are in the Target Designer section.

Go to PowerCenter Target Designer 0

Next, Please navigate to Targets menu in Menu Bar. From the following screenshot, you can observe the list of available targets inside the Informatica PowerCenter Designer. In this example, our task is to create a target table in Informatica from scratch. So, we are selecting the Create option. 

 

 

Create Target Table in Informatica 1

Once you select the Create option, a new window called Create Target table will be displayed:

Once you are done filling in the details, please click on the Create button to create a new empty table in our PowerCenter Target Designer.

Create Target Table in Informatica 2

We successfully created a new empty target table in Informatica Target Designer. 

 

 

Empty Table 3

To add new columns, we can edit the table definition by Right-click on the table definition and selecting the Edit..option from the context menu.

Create Target Table in Informatica 4

Once you select the Edit.. option, a new window called Edit tables will open. Within the Table tab, we can rename the table name by clicking the Rename button. Please change as per your requirements

Create Target Table in Informatica 5

To alter or modify the existing table, we have to navigate to Columns Tab. Here we want to add new columns so, Please select the first button (before scissors symbol) as shown below. It opens an empty row to add Column Name, Data Type, Precision (if required), Scale (if needed).

If it is a primary key, then change the Key type to primary and checkmark the Not Null option (if your column doesn’t allow null values)

Create Target Table in Informatica 6

We added six columns with three NVarchar data types and three Numeric data types. Once you added the required columns, Click OK to close the Edit tables window

Create Target Table in Informatica 7

From the below screenshot, see our newly created target table in Informatica. And also the table definition (Column Names and appropriate data types) inside our workspace. 

 

 

Create Target Table in Informatica 8

NOTE: The target tables we created in Informatica PowerCenter target designer will exist only in the target designer. If you want to add this table definition to SQL Server, we have to follow the steps we specified in Create Target table using Source Definition article (Starting from Step 1 to Step 8)

 

 

 

 

Informatica Mapping

Informatica Mapping represents the data flow between the Source and target tables. Or we can say that it defines the rules for data Transformation. To create Informatica Mapping, we require one or more Source Definitions, one or more Target definitions, and Transformations.

The following screenshot will show you the diagrammatic representation of the Informatica Mapping. 

 

Mapping Flow Diagram 0

From the above screenshot, you can observe that Every mapping in Informatica should contain the following components:

  • Source Definition: Here, we are going to use one or more sources that we created in the source analyzer. Please refer to the Source Analyzer article to understand its functionality.
  • Transformations: Modifies the source data using different types of available transformations.
  • Target Definition: Here, we are going to use one or more targets that we created in the target designer. Please refer to the Target Designer article to understand its functionality.

Informatica Mapping Designer

Before we start Informatica Mapping, First connect to the repository service.

To connect with the Repository service, we have to provide the Admin Console credentials. So, Please provide the Informatica Username and Password and click on the Connect button. 

 

TIP: Here, you have to provide the Admin Username and password that you specified while installing the Informatica Server.

Connect to Repository Admin Console  9

Once you connected successfully, Please navigate to the Tools menu in Menu Bar. The following screenshot will show the list of available tools inside the PowerCenter Designer.

In this article, we are explaining the Informatica Mapping. So, please select the Mapping Designer option. 

 

Informatica Mapping 10

Once you select the Mapping Designer option, we will be in the Mapping Designer screen.

TIP: Mapping Menu in the Menu bar will be available only when you are in the Mapping Designer section. Otherwise, it won’t show up.

 Informatica Mapping 1

STEP 1: To create a new mapping, Please navigate to the Mappings menu in Menu Bar and select the Create..option. It will open the Name window. Here, you have to write the unique name for this Informatica mapping and click the OK button.

 Informatica Mapping 2

STEP 2: Drag and drop the DimProducts source definition from Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer will automatically create the default transformation called source qualifier.

 Informatica Mapping 3

STEP 3: Drag and drop the Target_DimProducts target definition from Target’s folder to the Informatica mapping designer.

TIP: Generally, we place one or more transformations in between the Source definition and the target definition, and we will cover them in the following tutorials. 

 

Informatica Mapping 4

STEP 4: We have to connect the source qualifier with the target definition. The PowerCenter Designer provides multiple ways to connect them. The first approach is, Right-click on the empty space present in the mapping designer will open the context menu. Please select the Autolink.. option from it.

AutoLink option in Designer 5

The second approach is selecting all columns present in Source Qualifier and dragging them to the target definition. In both these approaches, if there is any mismatch in the column names, then we have to attach them manually.

Informatica Mapping 6

From the below screenshot, you can observe that we have a Size column in Source and Size_FLD in the target. In these situations, Auto link or dragging columns will not link them. So, please select the required column (Size) and drag it to the destination column (Size_FLD) to create the connection. 

 

NOTE: Informatica Mapping designer allows us to delete the wrong connections by selecting the link and deleting it.

Delete Unwanted items from designer 7

STEP 5: Let us validate it by going to Mapping Menu bar and selecting the Validate option.

Validate Informatica Mapping 8
 

Session in Informatica

A Session in Informatica is a set of instructions that tells the Informatica Integration Service when and how to move data from Source to target.

In Informatica, we have to create a session task for each Mapping because the Mapping is just a structural definition, and the session will move data from Source to destination. There are two types of sessions in Informatica: 

 

NOTE: Before you create a Non-reusable Session in Informatica, we must configure the Workflow manager to communicate with databases and Integration services.

In this article, we will show you how to create Non-reusable Session in Informatica with an example. For this example, we are going to use the Mapping that we created in our previous article.

Create Session in Informatica

Creating Non-reusable Session in Informatica follows three steps, so you have to follow the same procedure: 

 

First, connect to the repository service. To connect with the Repository service, we have to provide the Admin Console credentials so, Please provide the appropriate Informatica Username and Password and click on the Connect button.

From the below screenshot, you can observe that we are in the Task Developer.

PowerCenter Workflow Manager Task Developer 1

Configuring the Source and Destination connection

Before we start creating Session in Informatica, we have to set the relational database connections. To do this, Please navigate to Connections Menu and select the Relational option. 

 

Connect to Relational Database 2

Once you select on the Relational option, a new window called Relational Connection Browser will open. It helps us to create a connection to our relational database.

 Session in Informatica 3

For this Informatica session example, we are using the SQL as our source database that’s why we are selecting the Microsoft SQL Server as the Select Type

Choose Server Type 4

From the below screenshot, you can observe that currently, we don’t have any relational connections. To create a new one, please click on the New button.

 New Relational database Connection Settings 5

Once you click on the New button, a new window called Connection Object Definition will open.

Click Ok button after you fill the details

Session in Informatica 6

We need to create one more connection string for our target database. Although we can create using the steps mentioned above, we want to copy the above connection using the Copy As.. option. 

Session in Informatica 7

It opens the connection Object definition window for the target so, please specify the connection name, database name, and the remaining details.

Target Connection 9

NOTE: Once we configured the database connections, we have to create a workflow within the workflow manager. We will explain this in our next article.

Non-reusable Session in Informatica

To create Non-reusable Session in Informatica, Please navigate to Tasks Menu and select the Create option. 

Session in Informatica 11

Next, you have to enter a New name for this non-reusable session task in Informatica. Here we assigned the name as s_DimProducts_from_SQL_to_SQL

 Session in Informatica 12

Once you click on the Create button, a new window called Mappings will open. Here, we have to select the Mapping that you want to associate with this session. From the below screenshot, you can observe that currently, we have only one mapping, so we are selecting it.

TIP: Please refer Mapping article to understand the data transformation in below specified mapping m_DimProducts_from_SQL_to_SQL 

 

Session in Informatica 12.0

Our newly created Informatica session task was added to the Workflow Manager. Before we are adding or linking to the Workflow, we have to change a few properties and configure the connection strings of a Source and target. To do so, Please double-click on our Informatica session task

Session in Informatica 13

Double click on the Informatica Session task will open the following window. Within the General Tab, we can rename the Session Task to a more meaningful name. Please do not forget to provide a valid description of the Task.

Fail Parent if this Task fails: Please check mark this option. If this session task fails, then it will fail the workflow. 

 

 

Session in Informatica 14

Within Properties Tab, we have three common properties that we have to configure for the relational databases.

 

$Source connection value: This property will store the relational source information in $Source variable. So, we have to configure the source connection by clicking on the Arrow we marked below.

Choose $Source connection value 15

Once you click on the Arrow, a new window called Connection Browser will open. Since we are using the SQL as our source database, we are selecting the Microsoft SQL Server as the Select Type. Next, we are selecting the already created connection i.e., AdventureWorksDW 

 

TIP: If you want to create a new connection before then, you can use the New button.

Session in Informatica 16

$Target connection value: This property will store the relational target information in the $Target variable. So, we have to configure the target connection by clicking on the Arrow we marked below.

For this example, we are using the database as the destination so, we selected the Microsoft SQL Server as the Select Type and target as the Destination database name 

Choose $Target connection value 17

Write backward Compatible Session Log File: If you checkmark this option, Informatica generates the session file in text format so that we can review it later. Otherwise, it will produce only a binary format.

 Session in Informatica 18

Within the Config Object, we have to configure the Log options and Error handling. Although we have many properties, we are discussing and configuring the most common properties within this window.

Session in Informatica 19

Within the mappings tab, we have to configure the Source, target Connections, and some common properties. First, let us configure the source connections by clicking on the Dimproducts source present in the Sources folder. 

Session in Informatica 20

Within the Connections, select the Arrow button beside the relational type to open the Relational Connection Browser. This window helps you to configure the source connections (creating new, modifying, etc).

 

Here, we are using the Connection variable that we created in our previous step, i.e., $Source

Session in Informatica 21

Now, let us configure the target connections by clicking on the Target_Dimproducts present in the Targets folder. 

Within the Connections, select the Arrow button beside the relational type to open the Relational Connection Browser. Here, we are using the Connection variable that we created in our previous step, i.e., $Target

TIP: You can also select the Use Object option and select the Database name also.

Session in Informatica 22

Within the Target properties, we have to configure two common properties, and they are:

Target Load Type: If your target table has indexes, then use the Normal-type. Otherwise, Bulk type. Remember, the bulk type will insert the data faster than Normal, but it does not work on indexed tables.

Session in Informatica 23

Truncate target table option: By check-marking, this option will truncate the existing data from the destination table. It helps us to insert new data for every successful run.

Session in Informatica 24

Once you finished creating the Informatica session task, we have to Link the workflow with the Session Task.

 

 

Reusable Session in Informatica

In this article, we will show you how to create Reusable Session in Informatica with an example. For this example, we are going to use the Mapping that we created in our previous article.

Create Reusable Session in Informatica

Creating a Reusable Session in Informatica follows two steps. So you have to follow the same procedure: 

 

 

Before creating Reusable Session in Informatica, connect to the repository service. To connect with it, enter the Admin Console credentials. So, Please provide the appropriate Username and Password and click on the Connect button.

From the below screenshot, see that we are in the Informatica Target Designer.

Session Task Developer Window 1

Configuring the Source and Destination connection

Before we start creating Reusable Session in Informatica, we have to set the relational database connections. To do this, Please navigate to Connections Menu and select the Relational option. 

 

 

Configuring the Source and Destination connection 20

Selecting the Relational option opens a new window called Relational Connection Browser. It helps us to create a connection to our relational database.

Relational Connection Browser for Session 21

For this Informatica reusable session example, we used the SQL as our source database. So, select the Microsoft SQL Server as the Select Type

Choose Server for Session 22

From the below screenshot, we don’t have any relational connections. To create a new one, click on the New button. 

 

 

Create Database Connection for Session 23

Clicking the New button opens a new window Connection Object Definition

Click Ok button after you fill the details

Reusable Session in Informatica 24

We require to create one more connection string for our target database. Although we can build using the steps as discussed earlier, we copy the above connection using the Copy As.. option.

Reusable Session in Informatica 25

It opens the Connection Object Definition window for the target. So, please specify the connection name, database name, and the remaining details.

Reusable Session in Informatica 26

Reusable Session in Informatica

To create a reusable Session in Informatica, Within the Task Developer, Please navigate to Tasks Menu and select the Create option.

Reusable Session in Informatica 2

Once you select the Create option, Create Task window will open. From the drop-down list, Please select the Session Task 

 

 

Reusable Session in Informatica 3

Next, you have to enter a New name for this Informatica reusable session task. Here we assigned the name as s_DimProducts_from_SQL_to_SQL

Reusable Session in Informatica 4

Once you click on the Create button, a new window called Mappings will open. Here we have to select the Mapping you want to associate with this session. From the following screenshot, currently, we have only one mapping, so we are choosing it.

TIP: Please refer Mapping article to understand the data transformation in below specified mapping m_DimProducts_from_SQL_to_SQL 

 

 

Reusable Session in Informatica 5

Our newly created Informatica reusable session task was added to the Task Developer. Before we were adding or linking to the Workflow, we have to change a few properties and configure the connection strings of a Source and target. To do so, double-click on our session task

Reusable Session in Informatica 6

Double click on the Session task will open the following window. Within the General Tab, we can rename the Session Task to a more meaningful name. Please do not forget to provide a Task description for this Reusable Session in Informatica.

Reusable Session in Informatica 7

Within Properties Tab, we have three common properties that we have to configure for the relational databases. 

 

 

$Source connection value: This property will store the relational source information in $Source variable. So, we have to configure the source connection by Click on the Arrow we marked below.

Session $Source connection value 8

Once you click on the Arrow, a new window called Connection Browser opens. Since we are using the SQL as our source database, we are selecting the Microsoft SQL Server as the Select Type

Session $Source connection Browser 9

Next, we are selecting the already created connection i.e, AdventureWorksDW 

 

 

TIP: If you want to create a new connection, use the New button to create one.

Reusable Session in Informatica 10

$Target connection value: This property will store the relational target information in the $Target variable. So, we have to configure the target connection by Click on the Arrow we marked below.

For this example, we are using the database as the destination so, we selected the Microsoft SQL Server as the Select Type and target as the Destination database name 

 

 

Session $Target connection value 11

Write backward Compatible Session Log File: If you checkmark this, Informatica generates the session file in text format so we can review it later. Otherwise, it generates in a binary format only.

Reusable Session in Informatica 12

Within the Config Object, we have to configure the Log options and Error handling. Here, we are considering and configuring the most common properties within this window.

Reusable Session in Informatica 13

Within the mappings tab, configure the Source, target Connections, and some general properties. First, let us set the source connections by clicking on the Dimproducts Source present in the Sources folder. 

 

 

Within the Connections, select the Arrow beside the relational type to open the Relational Connection Browser. This window helps to configure the source connections (creating, modifying). Here, we used the Connection variable we created in our earlier step, i.e., $ Source

Reusable Session in Informatica 14

Now, let us configure the target connections by clicking on the Target_Dimproducts present in the Targets folder.

Within the Connections, select the Arrow button beside the relational type to open the Relational Connection Browser. Here, we are using the Connection variable that we created in our earlier step, i.e., $Target

Reusable Session in Informatica 15

Within the Target properties, configure two common properties, and they are:

Reusable Session in Informatica 16

Once you completed creating the session task, we have to Verify the task before using it. For this, navigate to Tasks Menu and select the Validate option.

Reusable Session in Informatica 17

From the below image, see our Reusable session in Informatica is a valid one.

Reusable Session in Informatica 18

Informatica Workflow

An Informatica Workflow is a set of instructions that tells the Informatica integration services how to run one or more task which is connected by links. Every workflow will start with a Start task (by default). So, when you start the workflow, it will begin executing from the Start Task and continue until the tasks get finished. Informatica PowerCenter Workflow manager provides two approaches to create it.

In this article, we will show you how to create an Informatica Workflow manually with an example. To create a workflow, we need the task (Session or Email). For this example, we are going to use the already created session task. 

 

Create Informatica Workflow

Before we start the Informatica Workflow demo, First connect to the repository service. To connect with the Repository service, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password and click on the Connect button.

TIP: Please refer Session article to understand the creation of session task and Reusable Session article to understand the creation of reusable Informatica session task

From the below screenshot, you can observe that we are in the Task Developer. 

 

Task Developer Window 0

To create a new Informatica Workflow, first, we have to go to the Workflow Designer tab. Next, Please navigate to Workflows Menu and select the Create option.

TIP: Workflows Menu in the Menu bar will be available only when you are in the Workflow Designer section. Otherwise, it won’t show up.

Informatica Workflow 1

Once you select the Create option, a new window called Create Workflow will open Please provide the unique name, comments and You can leave the default settings 

 

NOTE: Here you can change or delete the existing integration service also

Informatica Workflow 2

Once you created the Informatica workflow, you can create a Non-reusable session. Or you can use the already created reusable session. To demonstrate both, first, we are dragging the already created Reusable session s_DimProducts. Please refer to Reusable Session article to understand the steps involved in creating this.

 Informatica Workflow 4

Next, we removed the Reusable session and created a New session task. Please refer to the Session to understand the series of steps involved in creating the new session.

Informatica Workflow 4

Once you finished creating the Session task, we have link both the Start Task and Session Task. There are two ways to link them: First, you can select the Link Tasks button from the toolbar as shown below

 Informatica Workflow 5

The second approach, Please go to Task Menu bar and select the Link Task option

Informatica Workflow 6

From the below screenshot, you can see the connection/link between the Start Task and Session Task. 

 

Informatica Workflow 7

Once you finished creating the workflow in Informatica, we have to Validate the task before using it. To do so, Please navigate to Informatica Workflows Menu and select the Validate option.

Informatica Workflow 8

From the below screenshot, see that Our Informatica workflow is a valid one. Now, let us start the Informatica Workflow by navigating to the menu and selecting the Start Workflow option.

Informatica Workflow 9

Once you select the Start Workflow option, the PowerCenter Workflow monitor will be opened to monitor it. From the below screenshot, you can observe that our Informatica workflow executed without any errors. 

 

Informatica Workflow 10

Let us open the SQL Server Management Studio to check whether we successfully transferred the data from Adventure Works DW to the target database.

Target Table 11

 

 

 

 

Informatica Workflow using Wizard

In this article, we will show you how to create Informatica Workflow using Wizard with an example. Please refer Workflow article to understand the steps involved in creating Informatica Workflow manually

Creating Informatica Workflow using Wizard

Before we start creating Informatica Workflow using Wizard, First connect to the repository service using the Admin Console credentials. 

 

To create a new Informatica Workflow using Wizard, first, we have to go to the Workflow Designer tab. Next, Please navigate to Workflows Menu and select the Wizard option.

Informatica Workflow using Wizard 1

Select the Wizard option opens a new window called Workflow Wizard. Please provide a unique name, description and select the Integration service from the drop-down list

Informatica Workflow using Wizard 2

Within Step 2, we have to select the mapping from the Select the Mappings section. 

 

 

From the following screenshot, we have only one mapping. So we are selecting it. Once you chose the Mapping click on the >> button to create the session for the selected mapping

TIP: Please refer Mapping article to understand the data transformation in below mapping m_DimProducts_from_SQL_to_SQL

Informatica Workflow using Wizard 3

Once you click on the >> button, the session task created automatically. By check-marking, the Reusable option will make this session as a reusable session task. 

 

 

Informatica Workflow using Wizard 4

Within Step 2, we have to schedule the workflow. Here we have three Run options:

Informatica Workflow using Wizard 5

Next,

 

Run On Integration Service: Here, you have an option to schedule the workflow. For instance, if you want to load data from text file to SQL Database every Monday, then you schedule the workflow on Monday 1 AM

Informatica Workflow using Wizard 6

Before we click on the finish button, check the details. If you find any issues, click the Back button to alter the workflow.

 Informatica Workflow using Wizard 7

From the below screenshot you can see the new workflow

Informatica Workflow using Wizard 8

Once you finished creating the Informatica Workflow using Wizard, we have to Validate the task. For this, navigate to Workflows Menu -> Validate option. 

 

 

Informatica Workflow using Wizard 10

From the below screenshot, you can see that Our Informatica workflow is a valid one.

Informatica Workflow using Wizard 9

Let us start the Informatica Workflow by selecting the Start Workflow option.

Informatica Workflow using Wizard 11

Once you select the Start Workflow option, the Informatica PowerCenter Workflow monitor opens to monitor the workflow. As you can see, the workflow was executed without any errors. 

Informatica Workflow using Wizard 12

Let us open the Management Studio to check whether we successfully transferred the data from AdventureWorksDW to the target SQL Server database.

Informatica Workflow using Wizard 13

 

Command Task in Informatica

The Command Task in Informatica is used to run Unix or Shell commands during the Workflow. You can use this Task to Move, Copy, or Remove files after the data is loaded, etc. In this article, we will show you how to use the Command Task in Informatica with an example.

For this Informatica Command Task example, we are going to use the below show text file data (Employee table). From the below screenshot, you can see that the Source table has 15 records  

 

Command Task in Informatica 1

And the Destination table is Employee File. As you can see, it is an Empty table

   Command Task in Informatica 2

Command Task in Informatica Example

Before we start configuring the Command Task in Informatica to Load Data from Flat File to SQL Server. First, let me connect with the Informatica repository service. To do so, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password specified while installing the Server.

Step 1: Create Source Definition for Informatica Command Task

Once you connected successfully, Please navigate to Source Analyzer to define your Sources. As we said before, we are using the Employee table present in the local File System as our source definitions. So, Please navigate to Source menu and select the Import from File.. option  

 

Command Task in Informatica 3

Once you choose the Import from File.. option, a new window called Open Flat File will open. Please select the Employee.txt file from your local file system and click the Open button. I suggest you refer Flat File Source article to understand the following steps.

Command Task in Informatica 4

From the below screenshot you can observe that, you can see our newly created Flat File source.

Command Task in Informatica 5

TIP: We already explained the steps involved in importing a Text file in our previous article. So, Please refer to Flat File Source to understand the same. 

 

Step 2: Create Target Definition for Command Task in Informatica

Please navigate to Target Designer to define the Informatica Command Task Target. In this example, we are using the existing SQL table (Employee File) as our target definition. You can refer to Create a Target Table to understand the process of creating a target definition

Command Task in Informatica 6

Step 3: Create Mapping for Command Task in Informatica

To create a new mapping, Please navigate to Mappings menu in Menu Bar, and select the Create.. option.

 Command Task in Informatica 7

Once you select the Create.. option, a new Mapping Name window will open. Let me provide m_SQLEmp as the mapping name and click the OK button.

 Command Task in Informatica 8

Drag and drop the Employee source definitions from the Flat File Sources folder to the mapping designer. Once you drag the source, the Power Center designer automatically creates the Source Qualifier Transformation for you

Command Task in Informatica 9

Next, Drag and drop the target definition (Employee File) from the Targets folder to the mapping designer. Next, connect the source qualifier with the target definition using the Autolink.. option.

Command Task in Informatica 10

Before we close the Mapping, Let us Save, and Validate the mapping by going to Mapping Menu bar, and select the Validate option. 

Step 4: Create a Workflow for Command Task in Informatica

After we finish creating the Informatica Command Task Mapping, we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Command Task example, we will create the Workflow manually. To do so, Please navigate to Workflows Menu and select the Create option.

Command Task in Informatica 11

It will open the Create Workflow window. Please provide the unique name (wf_CommandEx) and leave the default settings. 

Command Task in Informatica 12

Once we created the workflow, our next step is to create a session task for our mapping.

Step 4(a): Create a Session for Command Task in Informatica

There are two types of sessions:

For this Informatica Command Task example, we created a Non-reusable Session. To create Non-reusable Session, Please navigate to Tasks Menu and select the Create option. 

Command Task in Informatica 13

Please provide a unique name for this Session. Here, we are naming it as s_CommandEx. Once you click on the Create button, a new window called Mappings opened. Here you have to select the Mapping that you want to associate with this Session, i.e., m_CommandEx.

 Command Task in Informatica 14

Double click on the Session task will open the Edit Tasks window. Within the mappings tab, we have to configure the Source and Target Connections. First, let us configure the Target connection by clicking on the EmployeeFile.

Within the Connections, click on the Arrow button beside the Relational type, and Select the Target Database (Target)  

 

Command Task in Informatica 15

Now, we have to configure the Source Connection. Please click on the SQ_Employee present in the Sources folder.

   Command Task in Informatica 16

Next, navigate to Workflows Menu and select the Validate option to validate the Informatica Command Task Workflow.

Command Task in Informatica 17

Step 4(b): Create a Command Task in Informatica

To create an Informatica Command Task, First, go to the Task Developer Tab. Next, navigate to Tasks Menu and select the Create option.  

 

Command Task in Informatica 18

Once you select the Create option, a new window called Create Task will open. First, select the Command Task, and provide a unique name for this Task and click on the Create button. Here, we are naming it as cmd_CopyFile.

Command Task in Informatica 19

Click on the Create button will create a Command task for you

Command Task in Informatica 20

Double click on the Informatica Command Task will open the following window. Within the General Tab, we can rename the Command Task to a more meaningful name. Please do not forget to provide a valid description of the Task. 

 

Command Task in Informatica 21

Within the Properties Tab, there is one property called :

Command Task in Informatica 22

Within the Commands Tab, you have to provide the command that you are going to use in this workflow. Please click on the New button to add a new command

Command Task in Informatica 23

We renamed the field as the Copy Command. Next, click on the Arrow to add the command

Command Task in Informatica 24

It opens a space to write your command. For this example, we are using the Copy command to copy the Employee File from Source Files to target files

Command Task in Informatica 25

Next, navigate to Workflows Menu and select the Validate option to validate the Workflow.

If you observe the Workflow, First, we are starting the Workflow. Next, it will run the Session task to load data from the text file to the SQL table. Once the data transferred, the Informatica Command Task will copy Employee File from Source to target

Command Task in Informatica 26

Now, Let me start the Workflow. To do so, navigate to the Workflows menu and select the Start Workflow option.

Command Task in Informatica 27

Let us open the SQL Server Management Studio and write the following SQL Query.

Command Task in Informatica 28

Now you can see the Employee file in the default target location. 

 

Command Task in Informatica 29

Command Task in Informatica Example 2

Instead of creating a Separate command task, you can also apply the functionality within the Informatica Session Task. Let me remove the Command task from the workflow to demonstrate the same.

Command Task in Informatica 30

Double click on the Session task, and go to the Components tab

Command Task in Informatica 31

For this example, we are going to create a command that has to execute after the Session is complete (Post-Session). Under the Type drop-down, we have three options. Let me select the Non-reusable command

Command Task in Informatica 32

Click on the New field

Command Task in Informatica 33

Next, click the Arrow field to write a command

Command Task in Informatica 34

For this example, we are using the Move command to move the Employee File from Source Files to target files

Command Task in Informatica 35

Let me run the Informatica Command Task Workflow and see. As you can see, there is no Employee under the Source folder

Command Task in Informatica 36

And the destination folder has this employee file

Command Task in Informatica 37

 

 

 

 

Event Wait Task in Informatica

The Event Wait Task in Informatica will wait for a particular (or specified) Event to occur. You can define an event for which this Event Wait Task should wait.

For example, you can create an event to check whether the Employee Source file (Text or CSV) is available at the Source location or not. It means, Informatica Event Wait Task will wait for Employee, and once it found, the task will succeed, and the next task will execute.  

 

For this Informatica Event Wait Task example, we are going to use below show text file data (Employee table). From the below screenshot, you can see that the Source table has 15 records

Event Wait Task in Informatica 1

And the Destination table is Employee File. As you can see, it is an Empty table

Event Wait Task in Informatica 2

Event Wait Task in Informatica Example

Before we start configuring the Event Wait Task in Informatica to Load Data from Text File to SQL Server. First, let me connect with the Informatica repository service.  

 

To do so, we have to provide the Admin Console credentials. So, please enter the Username and Password you gave while installing the Server, and click the Connect button.

Step 1: Create Source Definition for Event Wait Task in Informatica

Once you connected successfully, Please navigate to Source Analyzer to define your Sources. As we said before, we are using Employee table present in the local File System as our source definitions.

TIP: We already explained the steps involved in importing a Text file in our previous article. So, Please refer to Flat File Source to understand the same. 

 

Event Wait Task in Informatica 3

Step 2: Create Target Definition for Event Wait Task in Informatica

Please navigate to Target Designer to define the Target. In this example, we are using the existing SQL table (Employee File) as our target definition. You can refer to Create Target Table to understand the process of creating a target definition

Event Wait Task in Informatica 4

Step 3: Create Mapping for Event Wait Task in Informatica

To create a new mapping, Please navigate to the Mappings menu in Menu Bar and select the Create.. option. Let me provide m_EventWait as the mapping name and click the OK button.

Event Wait Task in Informatica 5

Drag and drop the Employee source definitions from the Flat File Sources folder to the mapping designer. It automatically creates the Source Qualifier Transformation for you

Next, Drag and drop the target definition (Employee File) from the Targets folder to the mapping designer. Next, connect the source qualifier with the target definition using the Autolink.. option.

Event Wait Task in Informatica 6

Before we close the Mapping, Let us Save, and Validate the mapping by going to Mapping Menu bar, and select the Validate option.

Step 4: Create a Workflow for Event Wait Task in Informatica

After you finish creating the Informatica Event Wait Task Mapping, we have to create the Workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.  

 

In this Informatica Event Wait Task example, we will create the Workflow manually. To do so, Please navigate to Workflows Menu and select the Create option.

Event Wait Task in Informatica 7

It opens the Create Workflow window. Please provide the unique name (wf_EventWait) and leave the default settings.

Event Wait Task in Informatica 8

Once we created the workflow, our next step is to create a session task for our mapping. 

Create a Session for Event Wait Task in Informatica

There are two types of sessions:

For this Informatica Event Wait Task example, we created a Non-reusable Session. To create Non-reusable Session, Please navigate to Tasks Menu and select the Create option.

Event Task in Informatica 25

Please provide a unique name for this session. Here, we are naming it as s_EventWait. Once you click on the Create button, a new window called Mappings will open. Select the Mapping that you want to associate with this session, i.e., m_EventWait. 

Event Wait Task in Informatica 9

Within the mappings tab, we have to configure the Source and Target Connections. First, let us configure the Source connection by clicking on the SQ_Employee present in the Sources folder.

Event Wait Task in Informatica 10

Now we have to configure the Target connection. So, first, select the EmployeeFile present in the Target folder. Next, within the Connections, click on the Arrow button beside the Relational type, and choose target

Event Wait Task in Informatica 11

Create an Event Wait Task in Informatica

To create an Event Wait Task, Please navigate to Tasks Menu and select the Create option.  

 

Event Wait Task in Informatica 12

Once you select the Create option, a new window called Create Task will open.

First, select the Informatica Event Wait Task from the drop-down list. Next, provide a unique name for this task and click on the Create button to create a New Event Wait. Here, we are naming it as WaitFor_TestFile. 

Event Wait Task in Informatica 13

Double click on the Event Wait task will open the following window. Within the General Tab, we can rename the Event Wait Task to a more meaningful name. Please do not forget to provide a valid description of the Task.  

 

Fail Parent if this task fails: Please check mark this option. If this Informatica Event Wait task fails, then it will fail the workflow.

Event Wait Task in Informatica 14

Within the Informatica Event Wait Task Events tab, we have two options:

Event Wait Task in Informatica 16

As you can see, if you select the User-defined event, it is opening the Event browser. As w don’t have any existing event, it displays an empty window.  

 

Event Wait Task in Informatica 17

For this example, we are selecting the predefined option and providing the path of an Employee text file. It means, Event Wait Task will wait for an Employee text file (at that location) and once it found the task will succeed

Event Wait Task in Informatica 18

Next, navigate to Workflows Menu and select the Validate option to validate the Workflow. If you observe the Informatica Event Wait Task Workflow, First, we are starting the Workflow. Next, it waits for Employee file (Event Wait Task), and if it found, Session task will load data from text file to SQL table.

Event Wait Task in Informatica 19

Before we start running the workflow, let me delete the Employee text file from the Source location.  

 

Event Wait Task in Informatica 20

Now, Let me start the Informatica Event Wait Task Workflow. To do so, navigate to the Workflows menu and select the Start Workflow option.

Event Wait Task in Informatica 21

As you can see the status, the Workflow is running infinitely.

Event Wait Task in Informatica 22

Once you add the Employee text file at the location Workflow will succeed. 

 

Event Wait Task in Informatica 23

Let us open the SQL Server Management Studio and write the following SQL Query.

Event Wait Task in Informatica 24