Informatica Tutorial on Transformations
Posted by Superadmin on July 01 2022 05:41:28

Informatica Tutorial on Transformations

 

A transformation is a part of Informatica Mapping, which transforms or modifies the data as per the selected transformation. This section of Informatica tutorial covers the list of available Transformations with practical examples.

 

  1. List of Transformations
  2. Aggregator Transformation
  3. Expression Transformation
  4. Filter Transformation
  5. Java Transformation
  6. Joiner Transformation
    1. Normal Join
    2. Master Outer Join
    3. Detail Outer Join
    4. Full Outer Join
  7. Lookup Transformation
    1. Lookup Transformation
    2. Unconnected Lookup Transformation
  8. Normalizer Transformation
  9. Rank Transformation
  10. Rank Transformation with Group By
  11. Router Transformation
  12. Sequence Generator Transformation
  13. Sorter Transformation
  14. Sorter Transformation – Remove Duplicates
  15. Source Qualifier Transformation
  16. SQL Transformation
  17. Stored procedure Transformation
  18. Transaction Control Transformation
  19. Union Transformation
  20. Update Strategy Transformation
  21. Update Strategy using Session Properties
  22. Example for Update Strategy
  23. XML Generator Transformation
  24. XML Parser Transformation
  25. XMLSource Qualifier Transformation
  26. Pre SQL and Post SQL

Informatica Transformations

Informatica Transformations are repository Objects that are used to perform aggregations, sorting, merging, modifying, distributing, etc., while passing data through them.

The Power Center Designer provides a set of transformations in Informatica that perform specific functions. For example, Sorter transformation will sort the input fields based on a specified field.  

 

Types of Transformations in Informatica

A transformation is a part of Informatica Mapping, which transforms or modifies the data as per the selected transformation. This section covers the list of available ones with practical examples.

Informatica transformations can divide into two types: Active or Passive. We can further divide them based on the connectivity in mapping: Connected and Unconnected Transformations.

Active Transformations in Informatica

An active type of transformation in Informatica can change the number of rows that pass through it. For example, if the input rows do not meet the specified expression, then those rows will not move to the target. 

Passive Transformations in Informatica

The Informatica passive transformation does not change the number of rows passing through it.

Connected Transformations in Informatica

Within an Informatica Mapping, if a transformation is connected to another or connected directly to the target table, it is called Connected.

All the active and passive can call connected transformations in Informatica, and they can receive / or provide multiple input ports. 

Unconnected Transformations in Informatica

Within the Mappings, if the Informatica transformation does not connect to others, we can call it Unconnected. It means it is neither connected to Source nor the target.

Unconnected Lookup is the best example of Informatica Unconnected.

Informatica Transformations List

Before we get into the list of Informatica transformations and their definitions, let me open my Power Center Designer to display the available list in mappings:

Informatica Transformations 1

and few more

Informatica Transformations 2

The following are a list of Informatica transformations that are available to transform data. I suggest you click on the URL (red color links) to navigate to the required transformation and find the example with a detailed explanation.

TransformationsTypeDescription
Aggregator Active / Connected It is used to perform Aggregate calculations such as SUM, MIN, COUNT etc.
Application Source Qualifier Active / Connected It represents the rows that the Integration Service reads from an application.
Custom Active or Passive / Connected It is used to call Procedures from DLL or shared Library
Data Masking Passive / Connected Use this to replace original data (sensitive data) with realistic test data. This is very useful while we are working in Non- Production environment.
Expression Passive / Connected Helps you to write Custom Calculation using Expression Editor.
External Procedure Passive / Connected or Unconnected This is used to call a procedure in a Shared Library or from the Com layer of Windows.
Filter Active / Connected Used to Filter the data
HTTP Passive / Connected Use this to connect with HTTP Server and read or update data.
Input Passive / Connected This is available in Mapplet Designer. Use this one to define the Input rows.
Java Active or Passive / Connected This is very useful to execute the code written in Java.
Joiner Active /Connected To Join data from multiple tables. There are four types of Joins: Normal JoinMaster Outer JoinDetail Outer Join, and Full Outer Join.
Lookup Active or Passive / Connected or Unconnected This Informatica transformation is useful to look up data present in Relational databases, or flat files
Normalizer Active /Connected Use this to normalize the data (DE normalized).
Output Passive / Connected This is available in Mapplet Designer. Use this to define the output rows.
Rank Active /Connected Used to Limit the records from Top or Bottom
Router Active /Connected Based on the group condition, it will route the data to multiple destinations or trans.
Sequence Generator Passive / Connected This Informatica Transformation will generate Numeric values. We mainly use this to generate primary keys
Sorter Active /Connected This is used to Sort the data based on the specified Column or Key
Source Qualifier Active /Connected It represents the rows that the Service reads from a Flat File or Relational Database.
SQL Active or Passive / Connected It helps you to execute SQL Queries against a Database
Stored Procedure Passive / Connected or Unconnected Use this to call a stored procedure.
Transaction Control Active / Connected By using this you can define Commit, and Rollback Transactions
Union Active / Connected This is used to combine or merge data from different databases or sources.
Unstructured Data Active or Passive / Connected This Informatica transformation transforms data in a semi-structured or unstructured format.
Update Strategy Active /Connected Used to determine whether to Insert, Update, Delete, or reject Rows.
XML Generator Active /Connected It reads data from one or more ports and returns XML
XML Parser Active /Connected Reads XML file and output the data.
XML Source Qualifier Active /Connected It represents the records that the Integration Service reads from an XML source.

If you want to save the above specified list of Informatica Transformations in your Mobile, then use below image 

 

Informatica Transformations 3

 

 

Aggregator Transformation in Informatica

The Aggregator Transformation in Informatica is one of the most used transformations in real-time. This transformation performs a function similar to the SQL Server Aggregate functions.

The Informatica Aggregator Transformation operations include the following:  

 

  • COUNT: It will count the number of values in this column. Null values are included in the count if you select (*) as the input column. Otherwise, null values ignored.
  • SUM: Calculate the Sum of the Column values.
  • AVG: Calculate the Average of the Column values.
  • MIN: Finding the Minimum Column value.
  • MAX: Finding the Maximum Column value.
  • Median: Calculate the Median of the column values.
  • Stddev: Calculate the Standard Deviation of the column values.
  • Variance: Calculate the Variance of the column values.

In this article, we explain the steps involved in configuring the Aggregator Transformation in Informatica to perform a few of the operations, as mentioned above.

Configure Aggregator Transformation in Informatica

Before we start configuring the Aggregator transformation in Informatica, First connect to the repository service.

To connect with the Informatica Repository service, we have to provide the Admin Console Username and Password you specified while installing the Server. 

Connect to Repository Service Admin page

Create Informatica Aggregator Transformation Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Aggregator Transformation example, we are using [Dim Geography] and [Fact Reseller Sales] from the SQL Server database as our source definitions. Please visit Database Source to understand creating source definition

  Aggregator Transformation in Informatica 1

Create Aggregator Transformation Target Definition

Please navigate to Target Designer and define the Informatica Aggregator Transformation Target. In this example, we are using the already created (Aggregator Transformation) SQL table as our target definition. Please refer Create Target table using Source Definition article

 Aggregator Transformation in Informatica 2

Create Informatica Aggregator Transformation Mapping

To create a new mapping for Informatica Aggregator Transformation, Please navigate to the Mappings menu and select the Create.. option. It opens the Mapping Name window. 

 

Here, you have to write a unique name for this mapping (m_Aggregator_Transformation) and click the OK button.

Aggregator Transformation in Informatica 3

Next, Drag and drop the [Dim Geography] and [fact Reseller Sales] source definitions from the Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer automatically creates the default transformation called the source qualifier.

 

As we all know that the [Dim Geography] and [fact Reseller Sales] tables have the Primary and Foreign key relationship. So, we removed one source qualifier and added the required fields from both tables to single source qualifier.

Create Aggregator Transformation in Informatica

In order to create Aggregator Transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Aggregator Transformation in Informatica 4

Once you click on the Create.. option, Create Transformation window will open as shown below. Please select the Informatica Aggregator Transformation from the drop-down list and specify the unique name (agg_Geography_Sales) for this transformation and click on Create button

Aggregator Transformation in Informatica 5

Once you click on the Create button, the Aggregator Transformation will add to the mapping designer. Please connect the Source definition with the transformation by dragging the required fields. 

From the below screenshot you can observe that we are excluding the unwanted columns like Spanish Country name, Keys, IP address locator etc.

Aggregator Transformation in Informatica 7

Double click on the Informatica Aggregator transformation to perform aggregations on the source. From the below screenshot you can see the list of available properties in the Transformation tab:

 
  • Select Transformation: By default, it will select the one. you clicked on.
  • Rename: This button will help you to rename the Aggregator transformation to a more meaningful name.
  • Make Reusable: If you check mark this option then, it becomes the reusable transformation.
  • Description: Please provide a valid description of this Informatica aggregator transformation.
Aggregator Transformation in Informatica 8

Below screenshot will show you the list of available options in the Ports tab of a Informatica Aggregator Transformation: 

  • Port Name: List of available column names. By clicking the New column button you can add new columns and by clicking the scissors button you can delete the unwanted columns.
  • I: Columns that are check-marked under this section are the Aggregator transformation Input columns.
  • O: Columns that are check-marked under this section are the Aggregator transformation Output columns. If you unchecked any column then, that column will not be available to load in a target table. From the below screenshot you can observe that we unchecked this port for five columns (Unit Price, Product Standard Cost, Total Product Cost, Sales Amount and Tax Amount) because we want to restore these columns with new fields (holding the aggregated data)
  • V: Please check mark this if it is variable
  • Expression: Here you can write the custom expression for the particular column.
  • Group By: Please checkmark the Column that you want to use for Group by, it is just like the GROUP BY Clause in SQL SELECT queries. In this example, we want to group the data by English Country Region Name, State Province Name and City.

We added 5 new columns using the New Port button. We are going to use these new columns to store the Aggregated information such as Sum, Mean, Median, Count etc..

TIP: All these new columns are output ports only so, please check mark O

Aggregator Transformation in Informatica 9

Let us write the custom expression to get the information we required. To do this, Click on the arrow button beside the o_UnitPrice. This will open the Expression Editor to write a custom expression. Here, we want to find the average of the Unite Price so select the AVG() function from the list of aggregate functions.

List Of Aggregate Functions 10

In this Informatica Aggregator Transformation example, we are calculating the Average of Unit Price, Sum Product Standard Cost, Median of Total Product Cost, Standard Deviation of Sales Amount and Variance of Tax Amount and Group by English Country Region Then by State Province Name and Then by City.

TIP: We select some random function, we suggest you follow your business logic to get more meaningful results.

Aggregator Transformation in Informatica 11

The list of available options in the Informatica Aggregator Transformation Properties tab. If your data is pre-sorted, please select the Sorted Input option. 

 

TIP: Selecting the Sorted Input option will improve the performance of the Aggregator transformation in Informatica.

Aggregator Transformation in Informatica 12

Once you finish configuring the aggregations, Click OK to close the window. Next, Drag and drop the target definition (aggregator transformation) from Targets folder to the mapping designer and connect the aggregator transformation with the target definition.

Please use the Autolink.. option to connect them.

Aggregator Transformation in Informatica 13

Before we close the Mapping, Let us validate the Informatica aggregator transformation mapping by going to Mapping Menu bar and selecting the Validate option.

Create a Workflow for Aggregator Transformation in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Aggregator Transformation example, we are going to use the manually created Workflow that we created in our earlier posts. Once we created the workflow, our next step is to create a session task for our mapping.

Create a Session

There are two types of sessions:

For this Informatica Aggregator Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Aggregator_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will open. Here you have to select the mapping you want to associate with this session. We are selecting the mapping (m_Aggregator_Transformation) that we created earlier (in Step 3).

Aggregator Transformation in Informatica 14

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we already explain them in Session’s article.

The Aggregator Transformation in Informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Aggregator Transformation in Informatica 15

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

Aggregator Transformation in Informatica 16

Let us open the SQL Server Management Studio to check whether we successfully performed aggregations using the Aggregator Transformation in Informatica.

Destination Table Data 17

 

 

 

 

 

Expression Transformation in Informatica

The Expression Transformation in Informatica is a passive transformation that is used to perform non-aggregate calculations on the source data. It means you can use this Informatica Expression transformation to perform calculations on a single row. For example, you are trimming the extra spaces, data conversions, string manipulations, etc.

The following are some of the operations achieved by the expression transformation in Informatica :  

 

This example explains the steps to configure the Expression Transformation in Informatica to store the Audit information. For this example, we are going to use the below show data

Source Table

In real-time this audit information will be very helpful to check the session time, Mapping Name, Workflow Name, Session Name, Integration Service Name, Repository Service Name, Repository User Name, Source Table Name, Session Start Time, and System Date.

Configure Expression Transformation in Informatica

In this example, Our task is to load [First Name], [Last Name], and [Yearly Income] from the above source to the target table along with Audit Information. Before we start configuring the Expression transformation in Informatica, First connect to the repository service. 

To connect with the Informatica Repository service, we have to provide the Admin Console Username and Password you specified while installing the Server. Next, click on the Connect button.

PowerCenter Admin page

Create Informatica Expression Transformation Source Definition

Once you connected, Please navigate to Source Analyzer and define your Sources. In this Informatica expression transformation example, we are using the [Employ] table from the SQL Server database as our source definitions. Please refer Database Source article for the source definition

   Expression Transformation in Informatica Source Analyzer

Create Informatica Expression Transformation Target Definition

Please navigate to Target Designer and define the Informatica Expression Transformation Target. In this example, we are using the already created SQL table (Expression Transformation) as our target definition. Please refer Create Target table using Source Definition article 

Expression Transformation in Informatica 1

Create Expression Transformation in Informatica Mapping

To create new Informatica Expression Transformation mapping, Please navigate to the Mappings menu and select the Create.. option. It opens the Mapping Name window to write a unique name (m_Expression_Transformation) and then click OK button.

 Expression Transformation in Informatica 2

Next, Drag and drop the [Employ] source definition from Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer will automatically create the default transformation called the source qualifier.

Creating Expression Transformation in Informatica

To create Expression Transformation in Informatica, Please navigate to the Transformation menu and select the Create.. option.

 Expression Transformation in Informatica 3

Once you click on the Create.. option, Create Transformation window will open. Please select the Informatica Expression Transformation and specify the unique name (exp_Audit_ Information) and then click on Create button

Expression Transformation in Informatica 4

Once you click on the Create button, Expression Transformation will add to the mapping designer. Please connect the Source definition with the transformation.

From the below screenshot you can observe that we are adding [First Name], [Last Name] and [Yearly Income] to the expression transformation  

 

Expression Transformation in Informatica 5

Double click on the Informatica Expression transformation to write the custom expressions. From the below screenshot, you can see the list of available properties in the Transformation tab:

Expression Transformation in Informatica 6

Below screenshot will show you the list of available options in the Informatica Expression Transformation Ports tab:

From the below screenshot, you can observe that We added 9 new columns using the New Port button. 

 

We are going to use these new columns to store the Audit information such as Mapping Name, Workflow Name, Session Name, Integration Service Name, Repository Service Name, Repository User Name, Source Table Name, Session Start Time and System Date.

TIP: All these new columns are output ports only. So, please checkmark O

Expression Transformation in Informatica 7

Let us write the custom expression to get the information we required. To do this, click on the arrow button beside the Mapping Name

Expression Transformation in Informatica 8

It opens the Expression Editor to write a custom expression. Here, we want the Mapping Name. So, please go to the Variables Tab and select one of the Built-in Variables called $PMMappingName.

Expression Transformation in Informatica 10

For the remaining fields in Informatica expression transformation, Please add the appropriate built-in variables.

Expression Transformation in Informatica 11

Once you finish configuring the expressions of Informatica expression transformation. Click OK to close the transformation window. Next, Drag and drop the target definition (expression transformation) from the Targets folder to the mapping designer. Next, connect the expression transformation with the target definition using the Autolink.. option.

Let us validate the mapping by going to the Mapping Menu bar and selecting the Validate option.

Expression Transformation in Informatica 12

From the above screenshot, you can observe that Our Mapping is a valid one.

Create a Workflow for Expression Transformation in Informatica

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

 

In this Informatica Expression Transformation example, we will create the Workflow manually. Once we created the workflow, our next step is to create a session task for our mapping.

Step 4(a):

There are two types of sessions:

For this Informatica Expression Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Expression_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will open. Here you have to choose the mapping you want to associate with this session.

From the below screenshot, you can observe that we are selecting the mapping (m_Expression_Transformation) that we created earlier (in Step 3).

Expression Transformation in Informatica 13

Double click on the Session Task to configure it. Although we have to set Sources, targets, and some common properties, we are not going to explain them here. We strictly recommend visiting the Sessions article to understand the features.

From the below screenshot, you can observe that the Expression Transformation in Informatica workflow is a valid one. Now, let us start the Workflow by selecting the Start Workflow option in the Workflows menu.

Expression Transformation in Informatica 14

Once you select the Start Workflow option, the PowerCenter Workflow monitor opened to monitor the workflow. From the below screenshot, see our Informatica Expression Transformation workflow executed without any errors.

Expression Transformation in Informatica 15

Let us open the SQL Server Management Studio to check whether we successfully stored the Audit Information using the Expression Transformation in Informatica or not.

Expression Transformation Destination Table 16

 

 

 

Filter Transformation in Informatica

The Filter Transformation in Informatica is used to filter the records based on the specified expression/condition. The Filter condition return Boolean TRUE or FALSE, it means integration service will check each row against the specified condition. And if the condition is TRUE then the Informatica Filter transformation will pass the row otherwise, it will skip the current row and check the next one.

Filter Transformation in Informatica is very helpful in real-time. For example, If you want to load the customer data whose sales value is above the minimum threshold etc. In this article, we are going to perform Filter Transformation on two SQL tables.  

 

For this Informatica Filter Transformation example, we are using the [Dim Products] and [fact Internet Sales] tables from our [Adventure Works DW 2014] database.

Filter Transformation in Informatica Example

Before we start doing anything, First connect to the Informatica repository service with your Admin Console credentials.

Create an Informatica Filter Transformation Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Filter Transformation example, we are using [Dim Products] and [fact Internet Sales] from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition 

Filter Transformation in Informatica 1

Creating a Target Definition for Filter Transformation in Informatica

Please navigate to Target Designer and define the Target. In this Informatica Filter Transformation example, we are using the already created SQL table (Filter Transformation) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Filter Transformation in Informatica 2

Create a Mapping for Filter Transformation in Informatica

In order to create a new mapping for Informatica Filter Transformation, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Filter_Transformation) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

 

Filter Transformation in Informatica 3

Next, Drag and drop the [Dim Products] and [fact Internet Sales] source definitions from Sources folder to the mapping designer. Once you drag the source, PowerCenter Designer will automatically create the default transformation called source qualifier as we shown below.

Filter Transformation in Informatica 4

As we all know that the [Dim Products] and [fact Internet Sales] tables have the Primary and Foreign key relationship. So, we removed one source qualifier and added the required fields from both tables to single source qualifier.

Filter Transformation in Informatica 5

Creating a Filter Transformation in Informatica

In order to create Filter transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Filter Transformation in Informatica 6

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Filter Transformation from the drop-down list and specify the unique name (fil_SalesAmount) for it and click on Create button

Filter Transformation in Informatica 7

Once you click on the Create button, filter transformation will be added to the mapping designer. In order to filter the records by an expression, filter Transformation requires some data. So, we have to connect the Source definition with the transformation using Autolink.. option (or select and Drag required fields).

Filter Transformation in Informatica 8

Double click on the Filter transformation to provide the filter condition. From the below screenshot you can see the list of available properties in the Transformation tab:

Filter Transformation in Informatica 9

Below screenshot will show you the list of available options in the Informatica Filter Transformation Ports tab:

Filter Transformation in Informatica 10

The following screenshot will show you the list of available options in the Properties tab. By default Filter Condition will be set to TRUE and here only we have to provide the condition. In order to specify the condition, click on the Arrow button as shown below.

TIP: If you specify the Filter Condition to FALSE then filter condition will not allow single record.

Filter Transformation in Informatica 11

Once you click on the arrow button, Expression Editor window will be opened as shown below. Here you can write custom expressions using the available functions, Ports (Column Names) and Variables.

Filter Transformation in Informatica 12

For this example, we are using the simple expression i.e., SalesAmount > 2000. It means Informatica Filter transformation will return the records whose sales amount is greater than 2000

Filter Transformation in Informatica 13

Once you finish configuring the properties, Click OK to close the transformation window.

Next, Drag and drop the target definition (Filter Transformation in Informatica) from the Targets folder to the mapping designer and connect the Transformation with the target definition. Please use the Autolink.. option to connect them.

Filter Transformation in Informatica 14

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

Create an Informatica Filter Transformation Workflow

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Filter Transformation example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Filter_Transformation) and leave the default settings.

Filter Transformation in Informatica 15

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Creating a Session

There are two types of sessions:

For this Informatica Filter Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Filter_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping (m_Filter_Transformation) that we created earlier (in Step 3).

Filter Transformation in Informatica 16

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that we assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Mapping Targets 17

From the below screenshot you can observe that the Filter Transformation in Informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Filter Transformation in Informatica 18

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

Filter Transformation Workflow 19

Let us open the SQL Server Management Studio to check whether we successfully restricted the records with Sales Amount less than 2000 using the Informatica Filter Transformation or not.

Filter Destination Table 20

 

 

 

Java Transformation in Informatica

The Java Transformation in Informatica provides an opportunity to write a custom Java code within the transformation. If you are familiar with Java programming, then you can write a complex code inside this transformation.

For this Informatica Java Transformation example, we are going to use SP Source and Destination tables. From the below screenshot, you can see that the Source table has 15 records, and the Destination table is Empty.  

 

Source and Destination 1

Java Transformation in Informatica Example

In this example, we show how to create and configure Java Transformation in Informatica. Before we start configuring, 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 you specified while installing the Server.

Create Source Definition for Java Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Java Transformation example, we are using the SP Source table from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps in creating a source definition 

Java Transformation in Informatica 2

Create Informatica Java Transformation Target Definition

Please navigate to Target Designer to define the Target. In this Informatica Java Transformation example, we are using the existing SQL table (SP Destination) as our target definition. You can refer to Create Target table using Source Definition to understand the creation of a target definition

   Java Transformation in Informatica 3

Create Informatica Java Transformation Mapping

To create a new mapping for Informatica Java Transformation, Please navigate to the Mappings menu in Menu Bar. Next, select the Create.. option.

Java Transformation in Informatica 4

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

Java Transformation in Informatica 5

Drag and drop the SP Source from Sources folder to the mapping designer. Once you drag the source, Power Center Designer automatically creates the Source Qualifier Transformation (default transformation) for you.

Java Transformation in Informatica 6

Create Informatica Java Transformation

To create Java transformation in Informatica, Please navigate to the Transformation menu in Menu Bar. Next, select the Create.. option.

 Java Transformation in Informatica 7

Selecting the Create.. option opens the Create Transformation window. Please select the Java Transformation from the drop-down list and provide the unique name (Java_Employees) for this transformation and click on Create button

Java Transformation in Informatica 8

Clicking the Create button will pop up a new window called Active or Passive. Please select whether you want to use this Java Transformation as an Active transformation or passive Transformation.

 Java Transformation in Informatica 9

By clicking OK will create a Java Transformation for you. Let me drag all the fields that are available in source definition to Java transformation.

Java Transformation in Informatica 10

Double click on the Informatica Java transformation to see and alter the properties. Below screenshot shows you the list of available properties in the Transformation tab:

Java Transformation in Informatica 11

The below screenshot shows you the list of available columns in the Ports tab. As you can, all the columns dragged from the source definition are in the OUTPUT section.

TIP: Few people may not drag fields from Source Qualifier at this point. They will create both Input and Output fields on their own, and then they point them to Source Qualifier.

Java Transformation in Informatica 12

To create new fields under the input section, select the INPUT, and then click the New field button.

Java Transformation in Informatica 13

In our Informatica Java Transformation source definition, we have 7 columns. So let me create 7 new fields under the INPUT section. We also need an extra output column for the New Income filed in our target table

Java Transformation in Informatica 14

Let me rename the Field names as per the Source Definition

Java Transformation in Informatica 15

Java Code Tab: This is used to write custom Java code. Here, the Left side window is a Navigator window – Which holds all Input, Output ports that are available in Java transformation, and few regularly used functions.

Java Transformation in Informatica 16

Let me write a simple code for this Informatica Java Transformation

Java Transformation in Informatica 17

Within the above code, we used the If Else Statement along with Equals method to check whether the Occupation of an employee is Management or not. If it is TRUE then we are adding 45750 to yearly income otherwise we added 25009. Code that we used is:

EmpID = in_EmpID;
FirstName = in_FirstName;
LastName = in_LastName;
Education = in_Education;
Occupation = in_Occupation;
YearlyIncome = in_YearlyIncome;
Sales = in_Sales;
if(in_Occupation.equals("Management"))
{
	NewIncome = in_YearlyIncome + 45750;
}
else
{
	NewIncome = in_YearlyIncome + 25009;
}
generateRow();

Once you finish configuring the Java Transformation, you have to map the Source qualifier with the Java Transformation Input fields.

Java Transformation in Informatica 18

Next, Drag and drop the target definition (SP Destination) from the Targets folder to the mapping designer. Next, connect the Output Fileds of a Java Transformation with the target definition using the Autolink.. option.

Java Transformation in Informatica 19

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

Create Informatica Java Transformation Workflow

After you finish creating the Informatica Java Transformation Mapping, we have to create the workflow for it. PowerCenter Workflow Manager provides two approaches to create a workflow. 

 

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

Java Transformation in Informatica 20

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

Java Transformation in Informatica 21

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

Create Java Transformation Session

There are two types of sessions:

For this Informatica Java Transformation example, we created a Non-reusable Session. To create Non-reusable Session, Please navigate to Tasks Menu and select the Create option as shown below.

Java Transformation in Informatica 22

Please provide a unique name (s_JavaEmp) for this session. Once you click on the Create button, a new window called Mappings will open. Here you have to select the mapping that you want to associate with this session, i.e., m_Java.

Java Transformation in Informatica 23

Double click on the Session task opens the Edit Tasks window. Within the mappings tab, we have to configure the Source, Target Connections.

First, let us configure the source connections by clicking on the SQ_SPSource source present in the Sources folder. Within the Connections, click on the Arrow button beside the Relational type, and select the Database Object (Database Name), i.e., Informatica Source

Java Transformation in Informatica 24

Now, we have to configure the Target Connection for this Informatica Java Transformation. So, click on the SPDestination present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type. Next, select the Database Object (Target Database Name), i.e., Informatica Target

Java Transformation in Informatica 25

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

Java Transformation in Informatica 26

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

Java Transformation in Informatica 27

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

Java Transformation in Informatica 28

 

 

 

Joiner Transformation in Informatica

The Joiner Transformation in Informatica is used to perform SQL Joins. There are four types of Joins in Informatica, and they Inner Join (Normal Join), Master Outer JoinDetail Outer Join and Full Outer Join. Joiner Transformation in Informatica is very useful to load data into the Dimension tables in Data Warehouse.

Normal Join: The Normal Join in Informatica is exactly similar to SQL Inner Join. It returns the records (or rows) present in both tables If there is at least one match between columns. Let us see the visual representation of the Normal Join for better understanding.  

 

Normal Join in Informatica

In this article, we are going to perform Normal Join on two SQL tables using Joiner Transformation in Informatica. Before we start designing the Mapping let us look at our two source tables on which we are going to perform Normal Join using Informatica Joiner Transformation.

Employees Table inside the Database is:

Left Table Source 1

Department Table inside the  

 

Right Department Table Source 2

Joiner Transformation in Informatica Example

Before we start doing anything, First connect to Informatica repository service. In order to connect with Repository service we have to provide the Admin Console credentials so, Please provide the appropriate Username and Password and click on Connect button as shown below.

   

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

Connect to Repository Admin Console

Step 1: Create Source Definition for Joiner Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Joiner Transformation example, we are using Department and Employee tables from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition 

 

Joiner Transformation in Informatica 1

Step 2: Creating a Target Definition for Joiner Transformation in Informatica

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Joiner Transformation in Informatica) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Joiner Transformation in Informatica 2

Step 3: Create Joiner Transformation in Informatica Mapping

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Joiner_transformation) and click OK button.

 

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Joiner Transformation in Informatica 3

Next, Drag and drop the Employee and Department source definitions from Sources folder to the mapping designer. Once you drag the source, PowerCenter Designer will automatically create the default transformation called source qualifier.

Step 3(a): Creating Joiner Transformation in Informatica

In order to create Joiner transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

 Joiner Transformation in Informatica 4

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please click on the arrow to select the required one from drop-down list. Let us select the Informatica Joiner transformation 

Joiner Transformation in Informatica 6

Next, Please specify the unique name for this Informatica Joiner Transformation (JNR_NORMAL) and click on Create button

Joiner Transformation in Informatica 7

Once you click on the Create button, the Informatica Joiner transformation will be added to the mapping designer. In order to perform Normal Join, the Joiner Transformation requires some data. So, we have to connect the Source definition with the transformation using Autolink.. option (or select and Drag required fields).

Joiner Transformation in Informatica 8

Double click on the Informatica Joiner transformation to configure the Join conditions. From the below screenshot you can see the list of available properties in the Transformation tab: 

Rename Transformation 9

The list of available options in the Informatica Joiner Transformation Ports tab:

  

NOTE: You don’t have to select each and every column present in the Master table. If you select One column from Employee then it will automatically the remaining columns.

Joiner Transformation in Informatica 10

Below screenshot will show you the list of available options in the Informatica Joiner Transformation Properties tab:  

 

Joiner Transformation in Informatica 11

Within the Condition tab, we have to specify the condition. In this example, we are going to perform Normal Join on Department and Employee table based on the condition Department. id = Employee.Depart Id. So, click on the New button (beside scissors) to create a new condition and select the columns names from Master and detail list

Joiner Transformation in Informatica 12

Once you finish configuring the Informatica Joiner Transformation properties, Click OK to close the window.

Next, Drag and drop the target definition from Targets folder to the mapping designer and connect the Joiner Transformation with the target definition. Please use the Autolink.. option to connect them. 

 

Joiner Transformation in Informatica 13

Before we close the Mapping, Let us validate the Informatica Joiner Transformation mapping by going to Mapping Menu bar and selecting the Validate option.

Step 4: Creating a Workflow

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Joiner Transformation example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_joiner_transformation) and leave the default settings. 

 

Joiner Transformation in Informatica 14

Once we created the workflow, our next step is to create a session for joiner transformation in informatica.

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session

There are two types of sessions: 

 

For this Informatica Joiner Transformation example, we are going to create Non-reusable Session. In order to create Non-reusable Session, Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping that we created earlier (in Step 3).

Joiner Transformation in Informatica 15

Double click on the Session Task to configure it. Although we have to configure some common properties, we are explaining only Sources, and targets properties. We strictly recommend visiting the Session article to understand the remaining properties.

Employee Source

Within the Connections, select the Arrow button beside the relational type to open the Relational Connection Browser as shown below. Here, Our Employee table is coming from the Source, we are using the Connection variable that we created in our previous step i.e., $Source

Joiner Transformation in Informatica 16
Department Source

Within the Connections, select the Arrow button beside the relational type to open the Relational Connection Browser as shown below. Here, Our Department table is also coming from the Source so we are using the Connection variable that we created in our previous step i.e., $Source

Joiner Transformation in Informatica 17

From the below screenshot you can observe that we assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Joiner Transformation in Informatica 18

From the below screenshot you can observe that the Informatica Joiner Transformation workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Joiner Transformation in Informatica 19

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

Joiner Transformation in Informatica 20

Let us open the SQL Server Management Studio to check whether we successfully performed the Normal Join using the Joiner Transformation in Informatica.

Destination Table Output 21

 

 

 

 

 

Master Outer Join in Informatica

The Master Outer Join in Informatica is used to return all the existing records from Details table and only matching records from Master table.

Let us see the visual representation of the Master Outer Join in Informatica for better understanding.  

 

Informatica Master Outer Join

In this article, we are going to perform Informatica Master Outer Join on two SQL tables using Joiner Transformation in Informatica.

Before we start designing the Mapping let us look at our two source tables on which we are going to perform Master Outer Join in Informatica.

Employees Table inside the Database is: 

Left Table Source 1

Department Table inside the

Right Table Source 2

Master Outer Join in Informatica Example

Before we start doing anything, First connect to the repository service with your Admin Console credentials.

TIP: Please refer to Normal JoinDetail Outer Join, and Full Outer Join articles to understand the remaining Joins in Informatica. 

 

Step 1: Creating Source Definition for Informatica Master Outer Join

Once you have connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Master Outer Join transformation example, we use Department and Employee tables from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

Joiner Transformation in Informatica 1

Step 2: Creating a Informatica Master Outer Join Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Master Outer Join in Informatica) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

   Master Outer Join in Informatica 1

Step 3: Creating Mapping for Informatica Master Outer Join

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. For this Informatica Master Outer Join transformation, you have to write a unique name for this mapping (m_Master_Outer) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Master Outer Join in Informatica 2

Next, Drag and drop the Employee and Department source definitions from Sources folder to the mapping designer. Once you drag the source, PowerCenter Designer will automatically create the default transformation called source qualifier.

Step 3(a): Creating Joiner Transformation in Informatica

In order to create Joiner transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Master Outer Join in Informatica 3

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Joiner transformation from a drop-down list and specify the unique name for this transformation (JNR_MASTER) and click on Create button

Master Outer Join in Informatica 4

Once you click on the Create button, the Joiner transformation will be added to the mapping designer. In order to perform Master Outer Join, Joiner Transformation requires some data.

So, we have to connect the Source definition with the transformation using the Autolink.. option (or select and Drag required fields).

Master Outer Join in Informatica 5

Double click on the Joiner transformation to configure the join conditions. From the below screenshot you can see the list of available options in the Ports tab:

NOTE: You don’t have to select each and every column present in the Master table. If you select One column from Employee then it will automatically the remaining columns.

Master Outer Join in Informatica 7

The list of available options in the Master Outer Join transformation Properties tab: 

 

Master Outer Join in Informatica 8

Within the Condition tab, we have to specify the condition. In this example, we are going to perform Informatica Master Outer Join on Department and Employee table based on the condition Department. id = Employee.Depart Id. So, click on the New button (beside scissors) to create a new condition and select the columns names from Master and detail list

Master Outer Join in Informatica 9

Once you finish configuring the Joiner transformation properties, Click OK to close the transformation window.

Next, Drag and drop the target definition from Targets folder to the mapping designer and connect the Joiner Transformation with the target definition. Please use the Autolink.. option to connect them.

Master Outer Join in Informatica 10

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

Step 4: Creating a Workflow

Once we finish creating the Mapping we have to create the workflow for Informatica master outer join. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Master Outer Join example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below.

Please provide the unique name (wf_Master_Outer) for this Informatica Master Outer Join transformation workflow and leave the default settings.

Master Outer Join in Informatica 11

Once we created the Informatica master outer join workflow, our next step is to create a session.

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session for Master Outer Join in Informatica

There are two types of sessions:

For this Informatica Master Outer Join example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Master_Outer) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping (m_Master_Outer) that we created earlier (in Step 3).

Master Outer Join in Informatica 12

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

We assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Assign Target table variable options 13

From the below screenshot you can observe that the Master Outer Join in Informatica workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Master Outer Join in Informatica 14

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

Master Outer Join in Informatica 15

Let us open the SQL Server Management Studio to check whether we successfully performed the Master Outer Join in Informatica using the Joiner Transformation or not.

Destination Table Output 16

 

 

 

 

Detail Outer Join in Informatica

The Detail Outer Join in Informatica is used to return all the existing records from Master table and only matching records from Detail table.

Let us see the visual representation of the Detail Outer Join in Informatica for better understanding.  

 

Informatica Detail Outer Join

In this article, we are going to perform Informatica Informatica Detail Outer Join on two SQL tables using Joiner Transformation. Before we start designing the Mapping let us look at our two source tables on which we are going to perform Detail Outer Join in Informatica.

Employees Table inside the Database is:

Detail Outer Join in Informatica Source 1

Department Table inside the Database is: 

Detail Outer Join in Informatica Source 2

Detail Outer Join in Informatica Example

Before we start doing anything, First connect to the repository service with your Admin Console credentials.

TIP: Please refer to Normal JoinMaster Outer Join, and Full Outer Join articles to understand the remaining Joins in Informatica.

Step 1: Creating Source Definition for Detail Outer Join in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica detail outer join example, we are using Department and Employee tables from SQL Server database as our source definitions. Please refer Database Source to understand the steps involved in creating source definition 

Detail Outer Join in Informatica 0

Step 2: Creating a Target Definition for Informatica Detail Outer Join

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Detail Outer Join in Informatica) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

   Detail Outer Join in Informatica 1

Step 3: Creating Informatica Detail Outer Join Mapping

For this Informatica detail outer join example, we created the m_Detail_Outer mapping. Please refer Mapping article to understand creating Mapping. Next, Drag and drop the Employee and Department source definitions from the Sources folder to the mapping designer. Once you drag the source, PowerCenter Designer will automatically create the default transformation called source qualifier.

 

Step 3(a): Creating Joiner Transformation in Informatica

In order to create Joiner transformation in Informatica, Please navigate to the Transformation menu in Menu Bar and select the Create.. option as shown below.

Detail Outer Join in Informatica 2

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Joiner transformation from a drop-down list and specify the unique name (JNR_DETAIL) for this transformation and click on Create button

Detail Outer Join in Informatica 3

Once you click on the Create button, the Joiner transformation will be added to the mapping designer. In order to perform Detail Outer Join, Joiner Transformation requires some data so, we have to connect the Source definition with the transformation using Autolink.. option (or select and Drag required fields).

Detail Outer Join in Informatica 4

Double click on the Joiner transformation to configure the join conditions. From the below screenshot you can see the list of available options in the Ports tab:

NOTE: You don’t have to select each and every column present in the Master table. If you select One column from Employee then Informatica will automatically the remaining columns.

Detail Outer Join in Informatica 6

Below screenshot will show you the list of available options in the Properties tab:

Detail Outer Join in Informatica 7

Within the Condition tab, we have to specify the condition. In this example, we are going to perform Informatica Detail Outer Join on Department and Employee table based on the condition Department. id = Employee.Depart Id. So, click on the New button (beside scissors) to create a new condition and select the columns names from Master and detail list 

 

Detail Outer Join in Informatica 8

Once you finish configuring the Joiner Transformation properties, Click OK to close the transformation window.

Next, Drag and drop the target definition (Detail Outer Join in Informatica) from Targets folder to the mapping designer and connect the Joiner Transformation with the target definition. Please use the Autolink.. option to connect them.

Detail Outer Join in Informatica 9

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

 

Step 4: Creating a Workflow for Detail Outer Join in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Detail Outer Join example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Detail_Outer) and leave the default settings.

Detail Outer Join in Informatica 10

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session for Informatica Detail Outer Join

There are two types of sessions:

For this Informatica Detail Outer Join example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Detail_Outer) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping (m_Detail_Outer) that we created earlier (in Step 3).

Detail Outer Join in Informatica 11

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that we assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Detail Outer Join in Informatica 12

From the below screenshot you can observe that the Informatica Detail Outer Join workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Detail Outer Join in Informatica 13

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

Detail Outer Join in Informatica 14

Let us open the SQL Server Management Studio to check whether we successfully performed the Detail Outer Join in Informatica using the Joiner Transformation or not.

Detail Outer Join in Informatica 15

 

 

 

Full Outer Join in Informatica

The Full Outer Join in Informatica is another option available in Joiner Transformation which is used to return all the existing records from Master table and Detail table.

Let us see the visual representation of the Full Outer Join in Informatica for better understanding.  

 

Informatica Full Outer Join

In this article, we are going to perform Informatica Full Outer Join on two SQL tables using Joiner Transformation. Before we start designing the Mapping let us look at our two source tables on which we are going to perform Full Outer Join in Informatica.

Department Table inside the Database is:

Left TableSource 2

Employees Table inside the Database is: 

Right Table Source 1

Full Outer Join in Informatica Example

Before we start configuring Informatica Full Join, First connect to the repository service with your Admin Console credentials.

TIP: Please refer to Normal JoinMaster Outer Join, and Detail Outer Join articles to understand the remaining Joins.

Step 1: Creating Source Definition for Full Outer Join in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Full outer join example, we are using Department and Employee tables from SQL Server database as our source definitions. 

Please refer Database Source to understand the steps involved in creating source definition

Full Outer Join in Informatica 0

Step 2: Creating an Informatica Full Outer Join in Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Full Outer Join in Informatica) as our target definition. Please refer Create a Target table using Source Definition to understand the steps involved in creating a target definition

 Full Outer Join in Informatica 1

Step 3: Creating Mapping for Full Outer Join in Informatica

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Full_Outer) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Full Outer Join in Informatica 2

Next, Drag and drop the Employee and Department source definitions from Sources folder to the mapping designer. Once you drag the source, PowerCenter Designer will automatically create the default transformation called source qualifier.

Step 3(a): Creating Joiner Transformation in Informatica

In order to create Joiner transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Full Outer Join in Informatica 3

Once you click on the Create.. option, Create Transformation window will be opened. Please select the Joiner transformation from a drop-down list and specify the unique name (JNR_FULL) for this transformation and click on Create button

Full Outer Join in Informatica 4

Once you click on the Create button, the Joiner transformation will be added to the mapping designer. In order to perform Full Outer Join, Joiner Transformation requires some data. So, we have to connect the Source definition with the transformation using the Autolink.. option (or select and Drag required fields).

Full Outer Join in Informatica 5

Double click on the Joiner transformation to configure the join conditions. From the below screenshot you can see the list of available options in the Ports tab:

Full Outer Join in Informatica 7

It is always good practice to select the table holding the least records as Master table. That’s why we are selecting a Department table as our Master table.

NOTE: You don’t have to select each and every column present in the Master table. If you select One column from Employee then Informatica will automatically the remaining columns.

Full Outer Join in Informatica 8

Below Informatica Full outer join screenshot will show you the list of available options in the Properties tab:

Full Outer Join in Informatica 9

Within the Condition tab, we have to specify the condition. In this example, we are going to perform Full Outer Join on Department and Employee table based on the condition Department. id = Employee.Depart Id. So, click on the New button (beside scissors) to create a new condition and select the columns names from Master and detail list

Full Outer Join in Informatica 10

Once you finish configuring the Joiner Transformation properties, Click OK to close the transformation window.

Next, Drag and drop the target definition (Full Outer Join in Informatica) from Targets folder to the mapping designer and connect the Joiner Transformation with the target definition. Please use the Autolink.. option to connect them.

Full Outer Join in Informatica 11

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

Step 4: Create a Workflow for Full Outer Join in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Full Outer Join example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Full_Outer) and leave the default settings.

Create Workflow 12

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session for Informatica Full Outer Join

There are two types of sessions:

For this Informatica Full Outer Join example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Full_Outer) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that, we are selecting the mapping (m_Full_Outer) that we created earlier (in Step 3).

Full Outer Join in Informatica 13

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that we assigned the $target variable to Connection Value and check marked the Truncate target table option to truncate the existing data from the destination table.

Assign Connection Variables 14

From the below screenshot you can observe that the Full Outer Join in Informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Full Outer Join in Informatica 15

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

Full Outer Join in Informatica 16

Let us open the SQL Server Management Studio to check whether we successfully performed the Full Outer Join in Informatica using the Joiner Transformation or not.

Full Outer Join in Informatica 17

 

 

 

 

 

Lookup Transformation in Informatica

The Lookup Transformation in Informatica is very useful to look up data present in Flat Files, Relational tables and Views. In this article, we will show you, How to perform the lookup operation on the SQL server database table using the Lookup Transformation in Informatica with an example.

Before we start designing the Mapping let us look at our source table on which we are going to perform Informatica Lookup operation and the lookup table  

 

Our Lookup table will be the table inside the Source Database is:

Reference Table 1

Our source table will be the below table inside the Database is:

Source Tabe 2

In this Informatica Lookup Transformation example, our task is to compare the Country name present in the Source table with a Lookup table and 

TIP: You can extend this functionality by performing some operations on Non-matching records and store them in a matched table using the Union Transformation.

Lookup Transformation in Informatica Example

Before we start configuring the Lookup Transformation in Informatica, First connect to the Informatica repository service. In order 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 Connect button as shown below.

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

Connect To Repository Admin Panel

Step 1: Creating Informatica Lookup Transformation Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources.

  

In this Informatica Lookup Transformation example, we are using the table from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

Lookup Transformation in Informatica 3

Step 2: Creating a Target Definition for Informatica Lookup Transformation

Please navigate to Target Designer and define the Target. In this Informatica Lookup Transformation example, we are using the already created SQL tables ([Lookup Matched Rows] and [Lookup Unmatched Rows]) as our target definitions. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Lookup Transformation in Informatica 4

Step 3: Creating Informatica Lookup Transformation Mapping

In order to create a new mapping for Informatica Lookup Transformation, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below.

Here, you have to write a unique name for this mapping (m_Lookup_Transformation) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping 

Lookup Transformation in Informatica 5

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

Step 3(a): Creating Lookup Transformation in Informatica

In order to create Lookup Transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option.

Lookup Transformation in Informatica 6

Once you click on the Create.. option, Create Transformation window will be opened as we shown below. Please select the Informatica Lookup Transformation from the drop-down list and specify the unique name (LKP_Country) for this transformation and click on Create button 

Lookup Transformation in Informatica 7

Once you click on the Create.. button, a Select Lookup Table for Lookup Transformation window will be opened as shown below. Here, we want to import a relational table from SQL database so, click on Import and select From Relational Table.. option

TIP: If your lookup table is present in Source or Target then select it.

Lookup Transformation in Informatica 8

Once you select From Relational Table.. option, Import tables window will be opened. Here we are selecting our lookup table called [LookupTransformationSource]. Please refer Import Data from Relation Database article to understand the steps involved in it. 

 

Lookup Transformation in Informatica 9

Once you click on the Create button, the Informatica Lookup Transformation will be added to the mapping designer. Double click on it to configure its settings.

The list of available options in the Ports tab. We added one new Input port (IN_CountryName) in this Informatica Lookup Transformation.

Lookup Transformation in Informatica 10

Within the Properties section, we change the Connection Information and assigned it with the $Source variable.

Lookup Transformation in Informatica 11

Within the condition tab we added one condition CountryName = IN_CountryName. Below condition states that it will check the lookup input source (i.e., Country Name) is equal to existing Country Name or Not, and if the condition is TRUE then it will return the corresponding Country Code.

Lookup Transformation in Informatica 12

Once you finish configuring the Informatica Lookup transformation, Please drag the Country Name field from the Source Qualifier to the IN_CountryName field in the lookup table

Step 3(b): Creating Router Transformation in Informatica

Please refer Router Transformation article to understand the steps involved in creating it. Once you created it, Please connect the Source qualifier with the router transformation by dragging the required fields.

From the below Informatica Lookup Transformation screenshot you can observe that we are adding all the columns from the Source Qualifier and Cid, Country Name from a Lookup table.

Lookup Transformation in Informatica 13

Double click on the Router transformation to add Groups. From the below screenshot, you can observe that we created one group for Non-Matching records and one default group.

Let us provide the expression or condition for the First group (Non-Matching) by clicking the arrow button as we shown below. This will open the Expression Editor to write a custom expression.

Here, we want the records whose Country Name is not present in the Lookup table. So, we are writing the below-shown expression (ISNULL(CountryName). It means all the Null values will be placed in Non Matched Group and Not null values will pass to Default Group.

Lookup Match Expression 14

Once you finish configuring the properties, Click OK to close the transformation window.

Lookup Transformation in Informatica 15

Next, Drag and drop the target definitions ([Lookup Matched Rows] and [Lookup Unmatched Rows]) from Targets folder to the mapping designer as shown below. 

 

Next, Please connect the Informatica Lookup Transformation (Output Group 1) with the [Lookup Unmatched Rows] table and Default Group with Router [Lookup Matched Rows].

TIP: You can use the Autolink.. option to link those fields.

Lookup Transformation in Informatica 16

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

 

Step 4: Creating a Workflow for Informatica Lookup Transformation

Once we finish creating the Mapping for Informatica Lookup Transformation, we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Lookup Transformation example, we will create the Workflow manually. Once we created the workflow, our next step is to create a session task for our mapping.

Step 4(a): Creating Session for Lookup Transformation in Informatica

There are two types of sessions:

For this Informatica Lookup Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Lookup_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session.

In this Informatica Lookup Transformation example, we are selecting the mapping (m_Lookup_Transformation) that we created earlier (in Step 3).

Lookup Transformation in Informatica 17

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are not going to explain them here. We strictly recommend visiting the Session article to understand the properties.

From the below screenshot you can observe that the lookup transformation in Informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Lookup Transformation in Informatica 21

Once you select the Start Workflow option, the PowerCenter Workflow monitor will be opened to monitor the workflow. And our Informatica Lookup Transformation workflow is executed without any errors.

Lookup Transformation in Informatica 18

Let us open the SQL Server Management Studio to check whether we successfully stored the unmatched records or not.

Lookup. Unmatched Rows Output Table 19

Let us open the SQL Server Management Studio to check whether we successfully stored the matched records using the lookup transformation in Informatica or not.

Lookup Matched Rows output Table 20

 

 

 

 

 

Unconnected Lookup Transformation in Informatica

The Unconnected Lookup Transformation in Informatica is nothing but a programming function with parameter and in order to call this unconnected lookup, we have to use the Expression transformation.

In this article, we will show you, How to perform unconnected Lookup Transformation in Informatica with an example. Before we start designing the Mapping let us look at our source table on which we are going to perform Lookup operation and the Lookup table  

 

Employees Table inside the Source Database is:

Lookup Source Table 1

Our Lookup table will be the Department Table inside the Database:

Lookup Source Table 2

In this Informatica unconnected lookup transformation example, our task is to load [First Name] and [Last Name] from the source (Employee table) table into the target table and also [Department Name] from the Department table. We can achieve the same using the Full Outer Join also but we will show you the alternative i.e unconnected Lookup Transformation in Informatica.  

 

Unconnected Lookup Transformation in Informatica Example

Before we start configuring the unconnected Lookup Transformation in Informatica, First connect to Informatica repository service.

In order 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 Connect button as shown below.

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

Connect to Repository Admin Panel

Step 1: Creating Source Definition for Unconnected Lookup Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Unconnected Lookup in Informatica example, we are using the Employee table from SQL Server database as our source definitions.

  

Please refer Database Source to understand the steps involved in creating source definition

Unconnected Lookup Transformation in Informatica 0

Step 2: Create a Target Definition for Informatica Unconnected Lookup Transformation

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Unconnected Lookup) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Unconnected Lookup Transformation in Informatica 1

Step 3: Create Informatica unconnected Lookup Transformation Mapping

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Unconnected_Lookup) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Unconnected Lookup Transformation in Informatica 2

Next, Drag and drop the [Employee] 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.  

 

Step 3(a): Creating Lookup Transformation in Informatica

In order to create Lookup Transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Unconnected Lookup Transformation in Informatica 3

Once you click on the Create.. option, Create Transformation window will be opened as we shown below. Please select the Lookup Transformation from the drop-down list and specify the unique name (LKP_Department) for this transformation and click on Create button

Unconnected Lookup Transformation in Informatica 4

Once you click on the Create.. button, a Select Lookup Table for Lookup Transformation window will be opened as shown below. Here, we are selecting the department table present in the Source  

 

Unconnected Lookup Transformation in Informatica 5

Once you click on the Create button, the Lookup Transformation will be added to the mapping designer. Since we are explaining about the unconnected lookup transformation there is no need to connect the transformation with the source qualifier.

Unconnected Lookup Transformation in Informatica 6

The list of available options in the Informatica unconnected lookup transformation Ports tab. Here, we added one new Input port (IN_DeptID) and removed the id from the output port.

Unconnected Lookup Transformation in Informatica 7

Within the condition tab, we added one condition id = IN_DeptID. Below condition states that whenever this lookup transformation is called they have to provide the parameter value of integer data type. 

 

Once they pass the value, Lookup transformation will check whether the value is equal to id or not, and if the condition is TRUE then it will return the corresponding department name otherwise NULL will be returned.

Unconnected Lookup Transformation in Informatica 8

Step 3(b): Creating Expression Transformation

Please refer Expression Transformation article to understand the steps involved in creating it. Once you created it, Please connect the Source qualifier with the expression transformation by dragging the required fields.

We are adding [First Name], [Last Name] and [DepartID] to the expression transformation. Double click on the Expression transformation to write the custom expressions.

Unconnected Lookup Transformation in Informatica 9

From the below screenshot you can observe that we created New Output Column called Department name. We are going to use this column to store the department name we get from the Informatica unconnected lookup transformation.

Click on the arrow button beside the Mapping Name as we shown below to write the custom expression

Unconnected Lookup Transformation in Informatica 10

This will open the Expression Editor to write a custom expression. Here, we want to get the Department Name from the Lookup Transformation.

To do this, Go to the Functions tab and search for Lookups folder and select the Lookup that we created earlier. As we all know that, we assigned the condition in Lookup transformation. It means we have to provide the parameter value of type integer.

TIP: Lookup transformation will check the condition id = DepartID and if the condition is TRUE then it will return the corresponding department name otherwise NULL will be returned.

Unconnected Lookup Transformation in Informatica 11

Once you finish writing the expressions, Click OK to close the transformation window. Next, Drag and drop the target definition (Unconnected Lookup) from Targets folder to the mapping designer and connect the expression transformation with the target definition. Please use the Autolink.. option to connect them.

Unconnected Lookup Transformation in Informatica 12

Before we close the Mapping, Let us validate the Informatica unconnected lookup mapping by going to Mapping Menu bar and selecting the Validate option.

Step 4: Creating a Workflow for Unconnected Lookup in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Unconnected Lookup Transformation example, we will create the Workflow manually. Once we created the workflow, our next step is to create a session task for our mapping.

Step 4(a): Creating Session for Unconnected Lookup Transformation in Informatica

There are two types of sessions:

For this Unconnected Lookup in Informatica example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Unconnected_Lookup) for the session.

Once you click on the Create button, a new window called Mappings will open. Here you have to select the mapping you want to associate with this session. In this Informatica unconnected lookup transformation, we are selecting the mapping (m_Unconnected_Lookup) that we created earlier (in Step 3).

Unconnected Lookup Transformation in Informatica 13

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are not going to explain them here. We strictly recommend visiting the Session article to understand the properties.

The unconnected lookup transformation in informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Unconnected Lookup Transformation in Informatica 15

Once you select the Start Workflow option, the PowerCenter Workflow monitor will open to monitor the workflow. And our Informatica Unconnected Lookup workflow was executed without any errors.

Unconnected Lookup Transformation in Informatica 16

Let us open the SQL Server Management Studio to check whether we successfully stored the stored the information from both Source and lookup table using the unconnected lookup transformation in informatica or not.

Destination Table 17

 

 

 

 

Normalizer Transformation in Informatica

The Normalizer Transformation in Informatica is an Active, and Connected transformation. This Informatica Normalizer transformation is used to normalize the denormalized data. Or you can simply say, divide single in a table to multiple rows.

For this Informatica Normalizer transformation example, we are going to use the below show data (Denormalized Source table)  

 

Normalizer Source Table 1

And the destination tables are:

Normalizer Destination Table 2

Normalizer Transformation in Informatica Example

Before we start configuring the Informatica Normalizer Transformation, First let me connect with the repository service. To do so, enter the Admin Console username and password you specified while installing the Server.

Create Normalizer Transformation Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this example, we are using the Denormalized Source table from the SQL Server database as our source definitions. Please refer Database Source article 

Normalizer Transformation in Informatica 3

Create Informatica Normalizer Transformation Target Definition

Please navigate to Target Designer and define the Target. In this Informatica Normalizer Transformation example, we are using the already created SQL tables (Normalized prosecutors and Sales) as our target definition. Please refer Target table using Source Definition to understand the target definition

   Normalizer Transformation in Informatica 4

Create Normalizer Transformation Mapping

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

Create mapping for Normalizer 5

It opens the Mapping Name window to write a unique name (m_normalizer) for this mapping. Next, click the OK button. 

Normalizer Transformation in Informatica 6

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

Next, let me create a Normalizer Transformation in Informatica. To do so, Please navigate to the Transformation menu and select the Create.. option

Normalizer Transformation in Informatica 7

It opens the Create Transformation window. Please choose the normalizer transformation and provide the unique name (nrm_ProductSale) and then click on Create button

 Normalizer Transformation in Informatica 8

Now you can see the Informatica Normalizer Transformation in your mapping area. Remember, you can’t simply drag and drop fields from Source Qualifier to Normalizer. So, we have to create the fields inside it explicitly.

Normalizer Transformation in Informatica 9

Double click on the Informatica Normalizer transformation to edit the Transformation. Next, go to the Normalizer tab, and use the New Field option to add new fields.

Normalizer Transformation in Informatica 10

From the below screenshot, you can observe that We added 7 new columns using the New Port button. Remember, both the Data type and Precision should match with the input and output fields.

Normalizer Transformation in Informatica 11

Next, we selected the Year column and clicked the Right Shift button beside the Level.

Normalizer Transformation in Informatica 12

It creates a Level field, and shift the Year column to Level 2.

Normalizer Transformation in Informatica 13

Similarly, we added the Sales and Orders columns to Level 2. In our Source table Year, Orders, and Sales are repeating for 4 times (2014, 2015, 2016, and 2017). That’s why we assigned 4 to Occurs. If this is not the case, then use an appropriate number.

Normalizer Transformation in Informatica 14

Now you can see the Number of Input and Output ports that are automatically created by the Normalizer Transformation in Informatica.

Normalizer Transformation in Informatica 15

You can see the Informatica Normalizer Transformation will all the required Filed name. Now we have to connect the Input and Outputs to this.

Normalizer Transformation in Informatica 16

First, we connected the Source Qualifier with the Informatica Normalizer Transformation 

 

Normalizer Transformation in Informatica 17

Next, Drag and drop the target definition from the Targets folder to the mapping designer

Normalizer Transformation in Informatica 18

Connect the Output fields from Normalizer transformation to the target definitions using the Autolink.. option. Before we close the Informatica Normalizer transformation Mapping, Let us validate the mapping by going to Mapping and selecting the Validate option.

Normalizer Transformation in Informatica 19

Create Normalizer Transformation in Informatica Workflow

After we finish creating the Mapping, we have to create a workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

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

Normalizer Transformation in Informatica 20

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

Normalizer Transformation in Informatica 21

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

Create Normalizer Transformation Session

There are two types of sessions:

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

Normalizer Transformation in Informatica 22

Please provide a unique name for this Informatica Normalizer transformation session. Here, we are naming it as s_NormalizerTran. Once you click on the Create button, a new window called Mappings will open. Here, we are selecting the m_normalizer

Normalizer Transformation in Informatica 23

Please link the Start Task and the session task.

Normalizer Transformation in Informatica 24

Double click on the Session task will open the Edit Tasks window. Within Properties Tab

$Source connection value: This property will store the relational source information in the $Source variable. So, click on the Arrow we marked below, and select the SQL Tutorial as the source information.

Normalizer $Source connection value 25

$Target connection value: This property will store the relational target information in the $Target variable. So, click on the Arrow we marked below, and select the SQL Test target as the Target information.

Normalizer $Target connection value 26

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

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created before, i.e., $Source

Select Normalizer Source Connection Variable 27

Now, we have to configure the Target Connection. So, click on the NormalizedProducts present in the Targets folder.

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target

Choose Normalizer Target Connection Variable 28

Do the same for the NormalizedSales Target

Normalizer target Database and Table Configuration 29

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

Normalizer Transformation in Informatica 30

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

Once you select the Start Workflow option, the PowerCenter Workflow monitor opened to monitor the workflow.

Let us open the SQL Server Management Studio to check whether we successfully Normalized the data or not. First, look at the products table:

Normalizer Destination Table 31

Let me show you the sales.

Normalizer Destination Table 32

 

 

Rank Transformation in Informatica

Rank Transformation in Informatica is similar to SQL RANK function, which is used to select the Top or bottom rank of data. In real-time, this transformation will be very helpful.

For example, you can use this Informatica rank transformation to select the top 10 regions with the highest and lowest sales Or bottom (underperforming) 20 products or regions etc.  

 

For this Informatica rank transformation example, we are going to use the below show data

Source Rank Table 1

Configure Rank Transformation in Informatica

Before we start configuring the rank transformation in Informatica, First connect to the repository service.

In order to connect with the Informatica Repository service, we have to provide the Admin Console  Username and Password you specified while installing the Server. Next, click on Connect button.  

 

Connect to Repository Admin Console

Create Rank Transformation in Informatica Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica rank transformation example, we are using the [Employ] table from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

   Rank Transformation in informatica 2

Create an Informatica Rank Transformation Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table as our target definition. Please refer Create Target table using Source Definition to understand creating a target definition

 Rank Transformation in informatica 3

Creating Rank Transformation in Informatica Mapping

In order to create a new mapping for rank transformation in informatica, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Rank_Transformation) and click OK button. 

Rank Transformation in informatica 4

Next, Drag and drop the [Employ] 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.

 

Create Rank Transformation in Informatica

In order to create Rank transformation in Informatica, Please navigate to Transformation menu and select the Create.. option as we shown below.

Rank Transformation in informatica 5

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Informatica Rank Transformation from the drop-down list and specify the unique name (rnk_Income) for this transformation and click on Create button

Rank Transformation in informatica 6

Once you click on the Create button, the Informatica rank transformation will be added to the mapping designer.

To rank the data, it requires some data. So, we have to connect the Source definition with the transformation by dragging the required fields.

Rank Transformation in informatica 7

From the above screenshot, you can observe the new item called RANKINDEX and this is default port created by the Informatica rank transformation. This output port will hold the ranking number so, we have to assign this output port to target table rank column. 

Double click on the Informatica Rank transformation to provide the ranking factor (based on which column you want to rank). From the below screenshot you can see the list of available properties in the Transformation tab:

  • Select Transformation: By default, it will select the transformation you clicked on.
  • Rename: This button will help you to rename to a more meaningful name.
  • Make Reusable: If you check mark this option then, this transformation will become reusable transformation.
  • Description: Please provide a valid description.
Rank Transformation in informatica 8

Below screenshot will show you the list of available options in the Informatica Rank Transformation Ports tab:

  
  • Port Name: List of available column names. By clicking the New column button you can add new columns and by clicking the scissors button you can delete the unwanted columns.
  • I: Columns that are check-marked under this section are the Input columns.
  • O: Columns that are check-marked under this section are the Output columns. If you unchecked any column then, that column will not be available to load in a target table.
  • R: Please checkmark the Column that you want to use as ranking factor (based on which column you want to rank). For example, If you want to rank the data by yearly Income then you have to checkmark it as we shown below.
Rank Transformation in informatica 9

Below screenshot show you the list of available options in the Informatica Rank Transformation Properties tab. 

  • Cache Directory: Integration service will store the Cache files in this location.
  • Top/Bottom: This will provide two options for the user i.e, Top and Bottom. If you want to rank the data from top to bottom (Z to A) then use the Top option or, for the bottom to top (A to Z) then use Bottom option.
  • Number of Ranks: Please enter the number of rows you want to rank for. By default, the value will be 1 and it means, the Informatica rank transformation will select only 1 record.
  • Case Sensitive String Comparison: If you check mark this option then, While sorting the data transformation will perform Case Sensitive String Comparison

For this example, we want to rank every record present in Employ table based on their Yearly Income (in descending order) that’s why we selected Top/Bottom property value as Top as and the Number of Ranks property value as 20 (our maximum records are 14)

Tp 10 or 20 Ranks Properties 10

Once you finish configuring the properties, Click OK to close the transformation window.

Next, Drag and drop the target definition (Rank Transformation) from Targets folder to the mapping designer and connect the Transformation with the target definition. Please use the Autolink.. option to connect them. 

Rank Transformation in informatica 11

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

Creating a Workflow for Rank Transformation in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Rank Transformation example, we will create the Workflow manually. To create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window. Please provide the unique name (wf_Rank_Transformation) and leave the default settings.  

 

Rank Transformation in informatica 12

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

Creating Informatica Rank Transformation Session

There are two types of sessions:

For this Informatica Rank Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Rank_Transformation) for the session.  

 

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session.

From the below screenshot you can observe that we are selecting the mapping (m_Rank_Transformation) that we created earlier (in Step 3).

Rank Transformation in informatica 13

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.  

 

From the below screenshot you can observe that we assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Rank Transformation in informatica 14

From the below screenshot you can observe that the Rank Transformation in Informatica workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Rank Transformation in informatica 15

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

 

Rank Transformation in informatica 16

Let us open the SQL Server Management Studio to check whether we successfully ranked the records using Yearly Income using the Informatica Rank Transformation or not.

Top 10 Ranks Table 17

We can achieve the above output using the following SQL Query:

SELECT [FirstName]
      ,[LastName]
      ,[Education]
      ,[Occupation]
      ,[YearlyIncome]
      ,[Sales]
      ,RANK() OVER (
                     ORDER BY [YearlyIncome] DESC
          	   ) AS RANK
  FROM [Customers]

Let us change the Top/Bottom property to Bottom and refresh the mapping. It means Informatica rank transformation workflow will rank the Employ table based on the Yearly Income in Ascending order (0 as 1, 1 as 2 …. )

Bottom 10 or 20 Ranks 18

Let us open the SQL Server to check whether we successfully ranked the records using Yearly Income (in ascending order) or not. Please refer to Functions article.

Destination Rank Table 19

 

 

Informatica Rank Transformation with Group By

The Informatica Rank Transformation is similar to SQL RANK function, which is used to select the Top or bottom rank of data. In this article, we are going to explain the steps involved in configuring the Informatica Rank Transformation with Group By along with an example.

For this example, we are going to use the below show data.  

 

Rank Source Table 5

Configure Informatica Rank Transformation with Group By

Before we start configuring the rank transformation, First connect to the Informatica repository service. In order to connect with the Repository service, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password that you specified while installing the Server and click on Connect button as shown below.

   Connect to Repository admin console

TIP: Please refer Rank Transformation in Informatica article to understand the transformation without Grouping

Step 1: Creating Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this example, we are using [Employ] table from SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition  

 

Informatica Rank Transformation 6

Step 2: Creating a Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Informatica Rank Transformation 7

Step 3: Creating Mapping

In order to create new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Rank_Transformation) and click OK button.

TIP: Please refer Mapping article to understand the steps involved in creating Mapping. 

Informatica Rank Transformation 8

Next, Drag and drop the [Employ] 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.

 

Step 3(a): Creating Rank Transformation in Informatica

In order to create Rank transformation in Informatica with the group by, Please navigate to the Transformation menu in Menu Bar and select the Create.. option as shown below.

Informatica Rank Transformation 9

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Rank Transformation from drop down list and specify the unique name (rnk_Income) for this transformation and click on Create button

 Rank Transformation in informatica 6

Once you click on the Create button, the rank transformation will be added to the mapping designer. In order to rank the data, rank Transformation requires some data. So, we have to connect the Source definition with the transformation by dragging the required fields.

Informatica Rank Transformation 10

From the above screenshot you an observe the new item called RANKINDEX and this is default port created by the Rank Transformation. This output port will hold the ranking number so, we have to assign this output port to target table rank column.

Double click on the Rank transformation to provide the ranking factor (based on which column you want to rank). Below screenshot will show you the list of available options in the Ports tab:

Informatica Rank Transformation 1

Below screenshot will show you the list of available options in the Properties tab.

 

For this example, we want to rank every record present in Employ table based on their Yearly Income (in descending order). That’s why we selected Top/Bottom property value as Top as and the Number of Ranks property value as 20 (our maximum records are 14)

Informatica Rank Transformation 10

Once you finish configuring the properties, Click OK to close the transformation window.

Next, Drag and drop the target definition (Rank Transformation) from Targets folder to the mapping designer and connect the Transformation with the target definition. Please use the Autolink.. option to connect them.

Informatica Rank Transformation 11

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

Step 4: Creating a Workflow

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Rank_Transformation) and leave the default settings.

Informatica Rank Transformation 12

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually. 

 

Step 4(a): Creating Session

There are two types of sessions:

For this example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Rank_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that, we are selecting the mapping (m_Rank_Transformation) that we created earlier (in Step 3).

Informatica Rank Transformation 13

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that, we assigned the $target variable to Connection Value, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Informatica Rank Transformation 14

From the below screenshot you can observe that the Informatica Rank Transformation with the group by workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Informatica Rank Transformation 2

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

Informatica Rank Transformation 3

Let us open the SQL Server Management Studio to check whether we successfully ranked the records using Yearly Income using the Informatica Rank Transformation with a group by or not.

Group By Rank 4

We can achieve the above output using the following SQL RANK Function Query:

SELECT [FirstName]
      ,[LastName]
      ,[Education]
      ,[Occupation]
      ,[YearlyIncome]
      ,[Sales]
      ,RANK() OVER (
                     PARTITION BY Occupation 
                     ORDER BY [YearlyIncome] DESC
          	   ) AS RANK
  FROM [Customers]

 

 

 

Router Transformation in Informatica

The Router Transformation in Informatica is just like IF condition or CASE statement. It will check the given condition and based on the condition result, an output will be sent to the appropriate destination path. This is similar to Filter transformation and we can use the Informatica Router Transformation when we have to test multiple conditions.

The Router Transformation in Informatica is very useful in real-time. For example, if we have a situation where we want to store the Employees records whose salary is greater than 40000 in one Table and less than 40000 in another table then we can use this Informatica Router Transformation to split the data based on the specified expression.  

 

For this Informatica Router Transformation example, we are going to use the below show data. Here, Our task is to conditionally split the below-shown data and store them in multiple database tables.

Router Source Table 1

Configure Router Transformation in Informatica

Before we start configuring the router transformation in Informatica, First connect to Informatica repository service. In order to connect with Repository service we have to provide the Admin Console credentials so, Please provide the appropriate Username and Password and click on Connect button as shown below.

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

 

Connect to Repository Admin Console

Creating Router Transformation in Informatica Source Definition

Once you have connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Router Transformation example, we use the [Products] table from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

   Router Transformation in Informatica 2

Create an Informatica Router Transformation Target Definition

Please navigate to Target Designer and define the Target. In this Informatica Router Transformation example, we are using the already created SQL tables (Router1, Router2, and Router3) as our target definitions. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Router Transformation in Informatica 3

Creating Router Transformation in Informatica Mapping

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. Here, you have to write a unique name for this mapping (m_Router_Transformation) and click OK button.Router Transformation in Informatica 4 

Next, Drag and drop the [Products] 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.

Creating Router Transformation in Informatica

In order to create Router transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Router Transformation in Informatica 5

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Informatica Router Transformation from the drop-down list and specify the unique name (rtr_Sales) for this transformation and click on Create button

 Router Transformation in Informatica 6

Once you click on the Create button, router transformation will be added to the mapping designer. In order to route the data, router Transformation requires some data so, please connect the Source definition with the transformation by dragging the required fields.

Router Transformation in Informatica 7

From the above screenshot, you can observe that we have our INPUT data. Let us define the output groups so, Double click on the Informatica Router transformation to provide the route conditions. From the below screenshot you can see the list of available properties in the Transformation tab:

  
  • Select Transformation: By default, it will select the transformation you clicked on.
  • Rename: This button will help you to rename the router transformation to a more meaningful name.
  • Make Reusable: If you check mark this option then, this transformation will become reusable transformation.
  • Description: Please provide a valid description of this transformation.
Edit and Rename Router 8

Below screenshot will show you the list of available options in the Informatica Router Transformation Ports tab: 

  • Port Name: List of available column names. By clicking the New column button you can add new columns and by clicking the scissors button you can delete the unwanted columns.
  • I: Columns that are check-marked under this section are the Input columns.
  • O: Columns that are check-marked under this section are the router transformation Output columns. If you unchecked any column then, that column will not be available to load in the target table.
Router Transformation in Informatica 9

Within the Groups tab, we have to define the group names and condition we want to use. From the below screenshot, you can observe that we created two groups (LEAST SALES and MEDIUM SALES).

 

TIP: The router transformation in Informatica will automatically create the default group (i.e., DEFAULT 1). Records which does not belong to above-mentioned groups will be stored in this group.

Router Transformation in Informatica 10

Let us provide the expression or condition for the First group (Least Sales) by clicking the arrow button as we shown below. This will open the Expression Editor to write a custom expression.

Here, we want the records whose Sales Amount is less than 400 so, we are writing the below-shown expression (SalesAmount < 400).

Router Expression 11

Next, provide the expression or condition for the Second group (Medium Sales) by clicking the arrow button and write the condition (SalesAmount >= 400 AND SalesAmount < 2000).

 Validate Router Expression 12

All the remaining rows will be acted as default output and they will be stored in DEFAULT 1 group (Sales Amount > 2000)

Router Transformation in Informatica 13

Once you finish configuring the properties, Click OK to close the Informatica Router Transformation window.

Next, Drag and drop the target definitions (Router 1, Router2 and Router3) from Targets folder to the mapping designer as shown below.

Router Transformation in Informatica 14

Next, Please connect the LeastSales (Output Group 1) with the first target definition (Router 1), MediumSales (Output Group 2) with Router 2 and Default 1(Default Group) with Router 3

Router Transformation in Informatica 15

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

Creating an Informatica Router Transformation Workflow

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Router Transformation example, we will create the Workflow manually. In order to create a new workflow, Please navigate to Workflows Menu and select the Create option. 

 

This will open Create Workflow window as shown below. Please provide the unique name (wf_Router_Transformation) and leave the default settings.

Router Transformation in Informatica 16

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Creating Session for Router Transformation in Informatica

There are two types of sessions:

  • Non-reusable Session Task: Please refer Session article to understand the steps involved in it.
  • Reusable Session Task: Please refer Reusable Session article to understand the steps involved in it.

For this Informatica Router Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Router_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping (m_Router_Transformation) that we created earlier (in Step 3).

Router Transformation in Informatica 17

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we not explaining any of them. We strictly recommend visiting the Session article to understand the properties.

From the below screenshot you can observe that the Router Transformation in Informatica workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Router Transformation in Informatica 18

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

Router Transformation in Informatica 19

Let us open the SQL Server Management Studio to show you the result of [Router 1] (i.e., an output of the Least Sales group)

Router Destination Output 2

Let’s see the result in [Router 2] Table in SQL Server. The following screenshot will show you the output of the Medium Sales group

Router Output Table 21

Let’s see the result in [Router 3] Table in SQL Server. The following screenshot will show you the output of the Default group. Please refer to Filter article.

Router Transformation in Informatica 20

 

 

 

Sequence Generator Transformation in Informatica

The Sequence Generator Transformation in Informatica is a connected transformation that generates numeric values. We can mainly use this transformation to generate primary keys, foreign keys or to fill or replace the missing primary keys with unique ones.

The Sequence Generator Transformation in Informatica has two output ports only NEXTVAL and CURRVAL and it will not allow the users to create new ports or alter, delete existing ports.  

 

In this article, we are going to explain the steps involved in configuring the Informatica Sequence Generator Transformation with an example. For this example, we are going to use the below show data

Source Table 1

Configure Sequence Generator Transformation in Informatica

Before we start configuring the sequence generator transformation in Informatica, First connect to the repository service. In order 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 Connect button.

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

 

Connect to Repository Admin Console

Step 1: Creating Source Definition for Sequence Generator Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Sequence Generator Transformation example, we are using the [Employ] table from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

  Rank Transformation in informatica 2

Step 2: Create Informatica Sequence Generator Transformation Target Definition

Please navigate to Target Designer and define the Target. In this Informatica Sequence Generator Transformation example, we are using the already created SQL table (Sequence Generator) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

 Sequence Generator Transformation in Informatica 1

Creating Mapping for Sequence Generator Transformation in Informatica

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window. Here, you have to write a unique name for this mapping (m_Sequence_Generator) and click OK button. 

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Sequence Generator Transformation in Informatica 2

Next, Drag and drop the [Employ] 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.

 

Creating a Sequence Generator Transformation in Informatica

In order to create Sequence Generator transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Sequence Generator Transformation in Informatica 3

Once you click on the Create.. option, Create Transformation window will be opened. Please select the Informatica Sequence Generator Transformation from the drop-down list and specify the unique name (seq_Employee) for this transformation and click on Create button

  Sequence Generator Transformation in Informatica 4

Once you click on the Create button, the Sequence Generator transformation will be added to the mapping designer. Next, Drag and drop the target definition (sequence generator) from Targets folder to the mapping designer and connect the source qualifier, Transformation with the target definition. Please use the Autolink.. option to connect them.

Sequence Generator Transformation in Informatica 5

From the above screenshot, you can observe that Informatica Sequence Generator transformation generates two default items NEXTVAL and CURRVAL. NEXTVAL port is the one we have to assign for the Employee_ID and we have to assign the CURRVAL inside the transformation editor. 

Double click on the Informatica Sequence Generator transformation to generate the sequential numbers. From the below screenshot you can see the list of available properties in the Transformation tab:

Edit and Rename Sequence 6

Below screenshot will show you the list of available options in the Informatica Sequence generator transformation Ports tab:

  Sequence Generator Transformation in Informatica 7

Below screenshot will show you the list of available options in the Informatica Sequence generator transformation Properties tab.

Sequence Generator Transformation in Informatica 8

From the below screenshot you can observe the properties we specified. Here, Sequence generator will start the sequence with value 1 and incremented by 2 until it reaches 6. After reaching end value, Sequence generator will start the sequence with value 0 (Start Value)

Sequence Generator Transformation in Informatica 9

Once you finish configuring the properties, Click OK to close the transformation window.

Sequence Generator Transformation in Informatica 10

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

 

Step 4: Creating a Workflow for Sequence Generator Transformation in Informatica

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Sequence generator transformation example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Rank_Transformation) and leave the default settings.

Sequence Generator Transformation in Informatica 11

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

NOTE: We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session for Informatica Sequence generator transformation

There are two types of sessions:

For this Informatica Sequence generator transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Rank_Transformation) for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here you have to select the mapping you want to associate with this session. From the below screenshot you can observe that we are selecting the mapping (m_Rank_Transformation) that we created earlier (in Step 3).

Sequence Generator Transformation in Informatica 12

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that the Sequence Generator Transformation in Informatica workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option. 

 

Sequence Generator Transformation in Informatica 13

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

Sequence Generator Transformation in Informatica 14

Let us open the SQL Server Management Studio to check whether we successfully generated the Employee_Id using the Sequence Generator Transformation in Informatica

Sequence Target Table 15

Let us change the Properties of Start Value, End Value and Incremented Value as shown below. Next, refresh the mapping and start the Workflow. 

 

Alter Sequence Start, End and Increment Value 16

Let us open the SQL Server Management Studio to check whether we successfully generated the sequential Employee_Id using the Sequence Generator Transformation in Informatica

Sequence Target Table output 17

 

 

Sorter Transformation in Informatica

The Sorter Transformation in Informatica is used to sort the source data in either Ascending or Descending order, similar to SQL command ORDER BY Statement.

In this section, we are going to demonstrate the steps involved in configuring the Informatica Sorter Transformation with an example. For this example, we are going to use the below show data  

 

Sorter Source Table 0

Configure Sorter Transformation in Informatica

Before we start the Informatica Sorter Transformation demo, First, connect to the Informatica repository service. For this, provide the Admin Console credentials (Username and Password) and click on the Connect button

Connect to Repository Admin Console

Step 1: Creating Source Definition for Sorter Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer to set our Sources. In this Informatica Sorter Transformation example, we are using the already created SQL table (Fact Internet Sales) as our source definition. Please refer Database Source to know the steps involved in creating a source definition

Sorter Transformation in Informatica 1

Step 2: Create Mapping for Sorter Transformation in Informatica

To create a new mapping for Informatica Sorter Transformation, Please navigate to the Mappings menu in Menu Bar and select the Create.. option. Here, you have to write a unique name for this Mapping and click the OK button.  

 

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Sorter Transformation in Informatica 3

Next, Drag and drop the [Fact Internet Sales] source definition from Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer will automatically create the default transformation called the source qualifier.

Step 2(a): Creating Sorter Transformation in Informatica

To create a sorter transformation in Informatica, Please navigate to the Transformation menu in Menu Bar and select the Create.. option. 

 

Sorter Transformation in Informatica 4

It opens a Create Transformation window, as shown below.

Sorter Transformation in Informatica 5

Please click on the arrow to select the required transformation from the drop-down list. Let us choose the Informatica Sorter transformation

Sorter Transformation in Informatica 6

Next, Please specify the unique name for this Informatica Sorter transformation and click on Create button

Sorter Transformation in Informatica 7

Once you click on the Create button, the Informatica Sorter transformation will be added to the mapping designer. In order to perform sorting, transformation requires some data so, we have to connect it with Source definition.

Sorter Transformation in Informatica 8The PowerCenter Designer provides multiple ways to connect the source qualifier with the newly created Sorter Transformation in Informatica. For this example, we are right-clicking on the empty space and selecting the Autolink.. option from that context menu.

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

Sorter Transformation in Informatica 9

From the above screenshot, you can observe that we successfully connected the source qualifier to the sorter transformation.

Double click on the Informatica Sorter transformation to configure the sort properties. Below window will show you the list of available properties in the Transformation tab:

Rename Sorter 10

The below screenshot will show you the list of available options in the Ports tab of an Informatica Sorter Transformation: 

Sorter Transformation in Informatica 11

To understand the Sorter Transformation in informatica, we are sorting one column with Ascending order and another with Descending order. From the below screenshot you can observe that, we are sorting the [Sales Amount] in Descending Order

Sorter Transformation in Informatica 12

Next, we are sorting the [Freight] in Ascending order. It means,

Sorter Ports 13

Click OK to finish configuring the Sorter Transformation. 

 

Step 2(b): Target Definition for Sorted Transformation in Informatica

First, Drag and drop the target definition from the Targets folder to the mapping designer. Next, We have to connect it with the target definition. Please use the Autolink.. option to connect them.

TIP: Please refer to Create Target Table article to understand importing the target definition from the SQL Database.

Sorter Transformation in Informatica 14

Before we close the Mapping, Let us validate the Informatica Sorter Transformation mapping by going to Mapping Menu bar and selecting the Validate option.

Step 3: Creating a Workflow for Sorter Transformation in Informatica

Once we finish creating the Mapping we have to create the workflow for it. The PowerCenter Workflow manager provides two approaches to creating a workflow.

In this Informatica Sorter Transformation example, we created the Workflow manually. We strictly recommend to refer Workflow article to understand the steps involved in creating Workflow manually. Once we created the workflow, our next step is to create a session.

Step 3(a): Creating an Informatica Sorter Transformation Session

There are two types of sessions:

For this Sorted Transformation in Informatica example, we are going to create Non-reusable Session. In order to create Non-reusable Session, Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name for the session.

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 below screenshot you can observe that we are selecting the mapping that we created earlier (in Step 2).

Sorter Transformation in Informatica 15

Although we have to configure sources, Target, and some common properties, we are explaining only two properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Select Sorter Target table Variable 16

From the below screenshot you can observe that Our workflow is a valid one. Now, let us start the Informatica Sorter Transformation Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Sorter Transformation in Informatica 17

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

Sorter Transformation in Informatica 18

Let us open the Management Studio to check whether we successfully transferred the sort data from Adventure Works DW to the target database. Please refer ORDER BY Statement article in SQL Server Tutorial.

Sorter Output Table 19

 

 

Remove Duplicates Using Sorter Transformation in Informatica

In this article, we are going to explain how to remove duplicates using Sorter Transformation in Informatica with an example. For this example, we are going to use the below show data

Remove Duplicates Using Sorter Transformation in Informatica 1

From the above screenshot, you can observe that we have 60398 records with many duplicates. Our task is to select distinct records or remove duplicates using sorter transformation in Informatica. 

Remove Duplicates Using Sorter Transformation in Informatica

Before we start removing duplicates using sorter, connect to Informatica repository service. For this, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password and click on the Connect button.

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

Remove Duplicates using Sorter Transformation in Informatica

Step 1: Creating Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define our Sources. In this example, we are using the already created SQL table (Internet Sales) as our source definition. Please refer Database Source to understand the steps involved in creating a source definition  

 

Remove Duplicates Using Sorter Transformation in Informatica 2

Step 2: Creating a Target Definition

Please navigate to Target Designer and define the Target(s). In this example, we are using the already created SQL table (Fact Internet Sales) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

   Remove Duplicates Using Sorter Transformation in Informatica 3

Step 3: Remove Duplicates using Sorter Transformation in Informatica Mapping

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

TIP: Please refer Mapping article to understand the steps involved in creating Mapping.

Remove Duplicates Using Sorter Transformation in Informatica 4

Next, Drag and drop the [Internet Sales] source definition from Sources folder to the mapping designer and create a sorter transformation. The sorter transformation requires some data to remove the duplicates. So, we have to connect the Source definition with the transformation using the Autolink.. option.

TIP: Please refer to Sorter Transformation article to understand the steps involved in configuring Sorter transformation.

Remove Duplicates Using Sorter Transformation in Informatica 5

Double click on the Sorter transformation to configure the properties. From the below screenshot, you can observe the list of available properties in Properties tab. In this example, we want to remove duplicate records so, checkmark the Distinct property.

TIP: This will act as SQL SELECT DISTINCT Statement

Remove Duplicates Using Sorter Transformation in Informatica 6

Next, If you observe the Ports tab, Sorter Transformation is sorting all the input columns in ascending order. Remember, you don’t have to do anything here.

Click the OK button to finish configuring the properties.

Remove Duplicates Using Sorter Transformation in Informatica 7

Next, Drag and drop the [Duplicate Sorter Transformation in Informatica] target definition from Targets folder to the mapping designer and connect the Sorter Transformation with the target definition. Please use the Autolink.. option to connect them.

Remove Duplicates Using Sorter Transformation in Informatica 8

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

Step 4: Creating a Workflow

Once we finish creating the Mapping we have to create the workflow to remove Duplicates using Sorter Transformation in Informatica. PowerCenter Workflow manager provides two approaches to create a workflow.

In this example, we created the Workflow manually. Once we created the workflow, our next step is to create a session.

We strictly recommend referring Workflow article to understand the steps involved in creating Workflow manually.

Step 4(a): Creating Session

There are two types of sessions:

For this example, we are going to create Non-reusable Session. To create Non-reusable Session in Informatica, Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to choose the Session as Task type (default) and enter a unique name for the session.

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 below screenshot, you can observe that we are choosing the Mapping that we created earlier (in Step 3).

Remove Duplicates Using Sorter Transformation in Informatica 9

Although we have to configure sources, Target, and some common properties, we are not going to explain them here. Please refer to Session article to understand the properties.

From the below screenshot, you can observe that the Remove Duplicates Using Sorter Transformation in Informatica workflow is a valid one. Now, let us start the Workflow by navigating to the Workflows menu and selecting the Start Workflow option.

Remove Duplicates Using Sorter Transformation in Informatica 10

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

Remove Duplicates Using Sorter Transformation in Informatica 11

Let us open the SQL Server Management Studio to check whether we successfully remove duplicates / transferred the distinct records from Adventure Works DW to the target database. 

 

Remove Duplicates Using Sorter Transformation in Informatica 12

From the above screenshot, you can observe that there are only 158 distinct records out of 60398. Let see the same by writing the Distinct query in SQL

Remove Duplicates Using Sorter Transformation in Informatica 13

 

 

Source Qualifier Transformation in Informatica

The Source Qualifier Transformation in Informatica is an Active, and Connected transformation. While creating a mapping, this is the default transformation generated by the power Center Designer.

This Informatica Source Qualifier Transformation converts the source data types to the native data types. In real-time, you can use this Informatica Source Qualifier Transformation to Join Multiple Sources, Write a custom query, Filter Rows, or Select Unique Records  

 

For this Informatica Source Qualifier Transformation example, we are going to use the below show data (Employee table)

Source Table 1

and the Department table

Department Table 2

and the Destination table is Source Qualifier. As you can see, it is an Empty table  

 

Destination Table 3

Configure Source Qualifier Transformation in Informatica

Before we start configuring the Informatica source qualifier transformation, First connect to the repository service by providing the Admin Console credential.

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

Create Source Qualifier Transformation Source Definition

Navigate to Analyzer and define your Sources. As we said before, we are using Employee and Department tables from the SQL Server database as our Informatica source definitions. Please refer Database to understand the creation of the source definition 

Source Qualifier Transformation in Informatica 4

Create Informatica Source Qualifier Target Definition

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

  Source Qualifier Transformation in Informatica 5

Create Source Qualifier Transformation in Informatica Mapping

To create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Source_Qualifier) and click OK button.

 Source Qualifier Transformation in Informatica 6

Create Source Qualifier Transformation in Informatica

Drag and drop the Employee, and Department from Sources folder to the mapping designer. Once you drag the source, Power Center designer will automatically create the source qualifier transformation (default transformation) for you.

Source Qualifier Transformation in Informatica 7

Let me remove the Department Table Source Qualifier

 Source Qualifier Transformation in Informatica 8

Next, we are adding the Department columns to the Employee source qualifier. This is one way of adding two tables

Source Qualifier Transformation in Informatica 9

Let me remove the SQ_Employee (Employee Source Qualifier as well).

Create Informatica Source Qualifier Transformation

To explicitly create Source Qualifier transformation in Informatica, Please navigate to Transformation menu in Menu Bar. Next, select the Create.. option will open the Create Transformation window as shown below.

Please select the Source Qualifier Transformation from the drop-down list and provide the unique name (SQ_EmployeeDetails) for this transformation and click on Create button

Source Qualifier Transformation in Informatica 10

That will open the below shown window as we shown below. Click OK to select the Department table and Employee table.

Source Qualifier Transformation in Informatica 11

Now you can see the same image that you have seen before

Source Qualifier Transformation in Informatica 12

Double click on the Source Qualifier transformation to see, and alter the properties. Below screenshot shows you the list of available properties in the Transformation tab:

Edit Transformation Name 13

Below screenshot shows you the available options in the Ports tab:

Source Qualifier Transformation in Informatica 14

Under Properties we have:

Source Qualifier Transformation in Informatica 15

Let me use the User Defined Join property to Join the Employee table and Department table

Source Qualifier Transformation in Informatica 16

As you can see we are using the below condition. You can refer SQL Joins article to understand the condition, or Joiner Transformation to understand the Joining concept. 

 

SQL Query Expression to Connect 17

Next, Drag and drop the target definition (SourceQualifier) from Targets folder to the mapping designer. Next, connect the source qualifier Transformation with the target definition. Please use the Autolink.. option to connect them.

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

Source Qualifier Transformation in Informatica 18

Create Source Qualifier Transformation in Informatica Workflow

After you finish creating the Mapping, we have to create the workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

In this example, we will create the Workflow manually. To do so, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window as shown below. Please provide the unique name (wf_Source_Qualifier) and leave the default settings.

Source Qualifier Transformation in Informatica 19

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

Create Source Qualifier Session

There are two types of sessions: 

 

For this example we created a Reusable Session, and named it as s_EmployeeDept_fromSQL_ToSQL for the session.Please link the Start Task, and the Session Task. Next, navigate to Workflows Menu and select the Validate option to validate the Workflow.

Source Qualifier Transformation in Informatica 22

From the above screenshot you can observe that the Source Qualifier Transformation in Informatica workflow is a valid one.

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

Source Qualifier Transformation in Informatica 23

Let us open the SQL Server to check whether we successfully performed the Joining using the Source Qualifier Transformation in Informatica

Output Destination Table 24

 

 

 

 

SQL Transformation in Informatica

The SQL Transformation in Informatica is used to write or use SQL Queries in the middle of the transformation. Using this SQL transformation, you can Insert, Delete, or Update rows in a Database. If you are familiar with queries, then you can use this transformation.

Here, we show you how to use Informatica SQL Transformation to write transact Queries within the transformation with an example. For this example, we are going to use SP Source and Destination tables.  

 

Source and Destination Table Data

SQL Transformation in Informatica Example

This example shows how to use SQL Transformation in Informatica to run the Script or Query against a database. Before we start configuring, First, connect with the repository service.

To do so, enter the Admin Console  Username and Password you specified while installing the Server.

Create SQL Transformation in Informatica Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Informatica Sources. In this example, we are using the Sp Source table from the database as our source definitions. Please refer Database Source article.  

 

Source Analyzer

Create SQL Transformation in Informatica Target Definition

Please navigate to Target Designer to define the Target. In this example, we are using the existing table (SP Destination) as our target definition. You can refer to Create Target table using Source Definition article.

   Target Designer

Create Informatica SQL Transformation Mapping

To create a new mapping for Informatica SQL Transformation, Please navigate to the Mappings menu and select the Create.. option.

Create Mapping for SQL Transformation in Informatica

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

Mapping Name

Drag and drop the SP Source from Sources folder to the mapping designer. Once you drag the source, Power Center Designer will automatically create the Source Qualifier Transformation (default transformation) for you.

Mapping Designer 6

Create SQL Transformation in Informatica

To create SQL Transformation in Informatica, Please navigate to the Transformation menu and select the Create.. option

 Create Transformation

Selecting the Create.. option will open the Create Transformation window. Please select the SQL Transformation and provide the unique name and click on Create button

Select SQL Transformation in Informatica 8

Clicking the Create button will pop up a new window called Informatica SQL Transformation.

 
  • Query Mode: Use this option to write Query directly inside the transformation. You can InsertDelete, or Update rows in a Database
  • Script Mode: If your Server query is saved in a Script file, then you can use this option. If you select this option, then you have to pass the Script file name.
  • DB Type: Please select the Database type. For example, SQL, Oracle, etc.
  • Static Connection: If you want the connection to be static, then select this option.
  • Dynamic Connection: Select this option for Dynamic connection.
  • Transformation in Passive Mode, By default, it is in Active mode. By checking this option, you can convert it to Passive Mode.

For this demo, we will write a Select Query. So, let me change the DB Type to Microsoft SQL Server and select the Query Mode

Specify The Database Type

By clicking OK will create an Active SQL Transformation In Informatica for you. 

SQL Transformation in Informatica Mapping Designer

Let me drag all the fields that are available in source definition to SQL Transformation in Informatica. It automatically creates a set of Input and Output fields.

Double click on the SQL Transformation in Informatica mapping editor to edit or configure the transformation. Under the Ports tab, you can see the auto-generated output ports from the source definition inputs.

  Edit Transformation

Ports: This is the most crucial tab in this transformation. It is where we are going to write a Query or selecting the script. Before we start writing the script, Let me add one extra field because our target table has a New Income column. To do so, click on the New field button 

Select the Transformation Type

It adds an extra column to the output section

   

Please rename the column to New Income and change its Native type. Next, change the Native Type of each Input and Output filed to match the Source and target definition. Once you have done with it, click on the Arrow beside the Query.

It opens an Editor with available parameters. As you can see, we are using Select Statement to select Yearly income from the SP Source table and adding 45999 to it for each employee record. And the Query is: 

SELECT YearlyIncome + 45999 FROM SPSource
WHERE EmpID = ?EmpID?
Transformation Editor

Check whether everything is OK or not. Remember, whatever the data that we got from the Select Statement saved as Output and our output field is New Income. So, New Income = Yearly Income + 45999 where Emp ID = 1, 2, 3, .. 15

Next, Drag and drop the target definition (SP Destination) from Target’s folder to the mapping designer. Next, connect the SQL Transformation Output fields with the target definition using the Autolink.. option.

SQL Transformation in Informatica 19

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

 

Create a SQL Transformation in Informatica Workflow

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

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

Create SQL Transformation in Informatica Workflow 20

It opens the Create Workflow window to provide the unique name and leave the default settings

Workflow Name

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

Step 4(a): Create a Session for SQL Transformation in Informatica

There are two types of sessions:

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

Create Task for SQL Transformation

Please provide a unique name for this session. Here, we are naming it as s_Employee. Once you click on the Create button, a new window called Mappings will open. Here you have to select the mapping that you want to associate with this session.

Select the SQL Transformation Mapping

Double click on the Session task will open the Edit Tasks window. Within Properties Tab

$Source connection value: This property will store the relational source information in the $Source variable. So, click on the Arrow we marked below, and select the Source as the source information.

$Target connection value: This property will store the relational target information in the $Target variable. So, click on the Arrow we marked below, and select the below Target as the Target information.

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

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created in our previous step, i.e., $Source

Now, we have to configure the Target Connection. So, click on the SPDestination present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target

Lastly, we have to configure the Informatica SQL Transformation. So, click on the Employee present in the Transformations folder.

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Source. It is because we used the Select Statement to select records from Source.

After completing the Session configuration, navigate to Workflows Menu, and select the Validate option to validate the Workflow.

Workflow and Task of a SQL Transformation in Informatica

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

Start SQL Transformation in Informatica Workflow

Open the Management Studio and write the following query.

Destination Table

 

 

 

 

Stored Procedure Transformation in Informatica

The Stored Procedure Transformation in Informatica helps you to use or call Stored procedures inside the Informatica Workflow. Using this transformation, you can operate Drop or Recreate Indexes, Check for Space in a Database, performing Complex Calculations.

This article shows how to use this Informatica Stored procedure Transformation to Rollback the passing records with an example. For this example, we are going to use SP Source and Destination tables.  

 

Data in Source and Destination Tables

And the Stored procedure that we are going to use is:

Stored Procedure that we use

From the above screenshot, you can see, that the stored procedure has one input parameter and one output parameter

TIP: We explained everything about the Stored procedure and its functionalities in the SQL Server tutorial. I suggest you refer Stored Procedures article to understand the topic.  

 

Stored Procedure Transformation in Informatica Example

Let us see how to use Stored Procedure Transformation in Informatica to call stored procedures inside a Workflow. Before we start configuring, 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 you specified while installing the Server.

Source Definition for Stored Procedure Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. Here, we are using the Sp Source table from the SQL database as our source definitions. Please refer Database Source to understand the steps in creating source definition 

 

Stored Procedure Transformation Source Analyzer 3

Create Target Definition for Stored Procedure Transformation

Please navigate to Target Designer to define the Informatica Stored Procedure Transformation Target. In this example, we are using the existing table (SP Destination) as our target definition. You can refer to Create Target Table to understand the process of creating a target definition

   Target Designer for Stored Procedure Transformation

Create Mapping for Informatica Stored Procedure Transformation

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

Create a Mapping for Stored Procedure Transformation

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

 

TIP: Please refer Mapping article to understand the procedure to create Mapping

Assign Mapping Name

Drag and drop the SP Source from Sources folder to the mapping designer. Once you drag the source, Power Center Designer will automatically create the Source Qualifier Transformation (default transformation) for you.

Mapping Designer 7

Create Informatica Stored Procedure Transformation

To create Stored Procedure Transformation in Informatica, Please navigate to the Transformation menu in Menu Bar. Next, select the Create.. option

Create Transformation option 8

Selecting the Create.. option will open the Create Transformation window. Please select the Stored procedure Transformation from the drop-down list and provide a unique name (sp_Testing) and click on Create button

Select Stored Procedure Transformation in informatica 9

Clicking the Create button will pop up a new window called Import Stored Procedure. Please select the ODBC connection that will connect with the Source. It is where our Stored procedure was created. To create a new ODBC Connection, please refer to the ODBC Connection article.

From the below screenshot, see that we are selecting the spUpdateCust stored procedure.

Import Stored Procedure into Informatica 10

By clicking OK will create a Informatica Stored Procedure Transformation for you. As you can see from the below screenshot, it has three ports: Return_value, EmpId, and New Income

SP Mapping Designer 11

Next, Drag and drop the target definition (SPDestination) from the Targets folder to the mapping designer.

sp transformation mapping 12

Next, we are connecting the EmpId from Source Qualifier to Transformation. Because spUpdateCust accepts one input parameter (EmpId) to return New Income output.

sp Transformation mapping 13

Double click on the Informatica Stored Procedure Transformation to see and alter the properties. Below screenshot shows you the list of available properties in the Transformation tab:

edit sp transformation 14

Below screenshot shows you the available options in the Informatica stored procedure transformation Ports tab:

edit sp Transformation 15

Within the properties tab, click on the Arrow button beside the Connection Information type, and use the Connection variable $Source because we used the SP that exists in information Source.

Relational Connection Browser

Drag and drop all the fields that exist in source qualifier Transformation to target definition. Please use the Autolink.. option to connect them. Next, connect the NewIncome field in transformation with target definition.

Stored Procedure Transformation in Informatica 17

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

Create Workflow

After you finish creating the Informatica Stored Procedure Transformation Mapping, we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

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

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

Create Stored Procedure Transformation Workflow

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

Create Session for Stored procedure Transformation in Informatica

There are two types of sessions:

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

Create task for Stored Procedure Transformation 20

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

Select Stored Procedure Transformation in Informatica mapping

Double click on the Session task will open the Edit Tasks window. Within Properties Tab

$Source connection value: This property will store the relational source information in the $Source variable. So, click on the Arrow we marked below, and select the Source as the source information.

$Target connection value: This property will store the relational target information in the $Target variable. So, click on the Arrow we marked below, and select the Target as the Target information.

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

Within the Connections, click on the Arrow button beside the Relational type. And use the Connection variable that we created in our previous step i.e., $Source

Now, we have to configure the Informatica Stored Procedure Transformation Target Connection. So, click on the SPDestination present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target

Here, we can also configure the connection information. To do so, click on the SP_Testing present in the Transformations folder.

Connection Information

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

Start Stored Procedure Transformation in Informatica workflow

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

Start sp transformation workflow task

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

Destination Table

 

 

 

 

Transaction Control Transformation in Informatica

The Transaction Control Transformation in Informatica allows you to control the Transactions within the Transformation. Using this transaction Control Transformation, you can Commit or Rollback the records (or rows) passing through it.

For this Informatica Transaction Control Transformation example, we are going to use SP Source and Destination tables. 

Transaction Source Table 1

Transaction Control Transformation in Informatica Example

In this example, we will show you how to use Transaction Control Transformation in Informatica to perform the Rollback Transaction. Before we start configuring, First, let me connect with the repository service.

To do so, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password you specified while installing the Server.

TIP:  We explained everything about the Transactions and its functionalities in the SQL Transaction article.  

 

Source Definition for Transaction Control Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Transaction Control Transformation example, we are using the Sp Source table from the SQL Server database as our source definitions. Please refer Database Source to understand the steps involved in creating Informatica source definition

Transaction Control Transformation in Informatica 2

Create a Target Definition for Informatica Transaction Control Transformation

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

Transaction Control Transformation in Informatica 3

Create Mapping for Transaction Control Transformation in Informatica

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

Transaction Control Transformation in Informatica 4

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

  Transaction Control Transformation in Informatica 5

Drag and drop the SP Source from Sources folder to the mapping designer. Once you drag the source, Power Center Designer will automatically create the Source Qualifier Transformation (default transformation) for you.

Transaction Control Transformation in Informatica 6

Create Informatica Transaction Control Transformation

To create Transaction Control Transformation in Informatica, Please navigate to the Transformation menu in Menu Bar. Next, select the Create.. option

 Transaction Control Transformation in Informatica 7

Selecting the Create.. option will open the Create Transformation window. Please select the Transaction Control Transformation from the drop-down list, and provide a unique name (Tran_Employee), and click on Create button

Transaction Control Transformation in Informatica 8

By clicking OK will create a Transaction Control Transformation for you.

Transaction Control Transformation in Informatica 9

Let me drag all the fields that are available in source definition to Transaction Control Transformation. Next, Drag and drop the target definition (SP Destination) from the Targets folder to the mapping designer. Lastly, connect the Transaction Control Transformation fields with the target definition using the Autolink.. option. 

Transaction Control Transformation in Informatica 10

Double click on the Informatica Transaction Control Transformation to edit or configure the transformation. Please go to the Properties tab, and click on the Arrow beside the Transaction Control Condition to apply transactions at the mapping level.

Edity and Rename the Transaction 11

Once you click the Arrow, an expression window will open. The Expression window in Transaction Control Transformation uses the IIF Function to test each row against the condition.

The Informatica Transaction Control Transformation provides the following built-in variables to apply transactions. For the demonstration purpose, let us take the above specified SP Source table and condition is EmpID = 5. 

IIF Expression for Transaction 12

Click Apply and then click OK to close the Informatica Transaction Control Transformation window.

 Transaction Attribute Values 13

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

Create a Workflow for Transaction Control Transformation in Informatica

After you finish creating the Informatica Transaction Control Transformation Mapping, we have to create the Workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

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

Transaction Control Transformation in Informatica 14

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

Transaction Control Transformation in Informatica 15

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

Create a Session for Transaction Control Transformation in Informatica

There are two types of sessions:

For this Informatica Transaction Control Transformation example, we created a Non-reusable Session. To create Non-reusable Session, Please navigate to Tasks Menu and select the Create option as shown below.

Transaction Control Transformation in Informatica 16

Here, we are naming this session as s_Transaction. Once you click on the Create button, a new window called Mappings will open. Here, select the Mapping (m_Transaction) that you want to associate with this session. 

 

Transaction Control Transformation in Informatica 17

Double click on the Session task will open the Edit Tasks window. Within the mappings tab, we have to configure the Source, Target Connections.

First, let us configure the source connections by clicking on the SQ_SPSource source present in the Sources folder. Within the Connections, click on the Arrow button beside the Relational type, and select the Database Object (Database Name) i.e., Source

Transaction Source Database 18

Now, we have to configure the Target Connection. So, click on the SPDestination present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and select the Database Object (Target Database Name) i.e., target 

 

Target Transaction Database 19

Please change the Target Load Type to Normal or Bulk as per your requirements. Let me checkmark the Truncate target table option as well.

Transaction Control Transformation in Informatica 20

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

Transaction Control Transformation in Informatica 21

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

 

Transaction Control Transformation in Informatica 22

Let us open the SQL Server Management Studio and write the following SQL Query to check whether we successfully transferred the data from a source or not. As you see that our target table is displaying records where EmpID = 10. Because Rollback will start before processing the record whose EmpID, is 10

This time we will use the TC_ROLLBACK_AFTER as the second argument in IIF. It means the Rollback option will perform after passing the EmpID 10.

IIF Expression for Transaction 24

As you can see, our target table is displaying records where EmpID is greater than 10

Transaction Destination Table Output 25

 

 

 

 

Union Transformation in Informatica

The Union Transformation in Informatica is used to combine data from multiple sources (excel files, flat file etc) or multiple SQL tables and produce one output to store in the target table. It is an active transformation and it is similar to the SQL Union All.

The Union Transformation in Informatica is very useful in real-time. For example, if the company has 100 stores and each store maintain their own sales data. End of the day they all belongs to one company and your job is to find out the one month or year sale for any single product. It is not practical to visit 100 stores or cross-checking 100 excel or flat files and calculating the sales.  

 

In this situations, all you have to do is, use Union Transformation in Informatica to combine all the 100 excel files from 100 stores and store it in the data warehouse and then, calculate the product sales from the database.

Union Transformation in Informatica Guidelines

Please remember the following guidelines while you are working with the Informatica Union Transformation :

  • The Informatica Union Transformation allows multiple input groups but produce a single output.
  • It doesn’t remove duplicate records from the input source.
  • It doesn’t generate transactions.
  • You can not use Sequence Generator Transformation to generate sequences

For this Informatica Union Transformation example, we are going to use the SQL tables that we created using the Router Transformation. The following screenshot will show you the data inside the [Router 1] table.  

 

Source Table for Union 1

The data inside the [Router 2] table.

  Source Table for Union 2

The data inside the [Router 3] table.

 Union Source Table 3

Here, Our task is to combine these three tables using the Informatica Union Transformation and save it in the destination table. 

Configure Union Transformation in Informatica

Before we start configuring the union transformation in Informatica, First connect to the Informatica repository service. In order 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 Connect button as shown below.

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

Connect to repository admin console

Create Union Transformation in Informatica Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica union transformation example, we are using [Router 1], [Router 2], and [Router 3] tables from the SQL Server database as our source definitions. Please refer to Database Source to understand the steps involved in creating a source definition

 Union Transformation in Informatica 1

Create Union Transformation in Informatica Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Union Transformation) as our target definitions. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

  Union Transformation in Informatica 2

Create Union Transformation in Informatica Mapping

In order to create a new mapping, Please navigate to Mappings menu in Menu Bar and select the Create.. option. This will open the Mapping Name window as shown below. Here, you have to write a unique name for this mapping (m_Union_Transformation) and click OK button.

Union Transformation in Informatica 3

Next, Drag and drop the [Router 1], [Router 2], and [Router 3] source definitions from Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer will automatically create the default transformation called source qualifier for them. 

Create Union Transformation in Informatica

To create Union transformation in Informatica, Please navigate to Transformation menu in Menu Bar and select the Create.. option as we shown below.

Union Transformation in Informatica 4

Once you click on the Create.. option, Create Transformation window will be opened as shown below. Please select the Informatica Union Transformation from a drop-down list and specify the unique name (UN_Products) for this and click on Create button

Union Transformation in Informatica 5

Clicking the Create button will add the union transformation to the mapping designer. In order to perform union all, Union Transformation requires some data so, please connect the Router 1 Source qualifier with the transformation by dragging the required fields. 

Once you drag the fields, the Informatica union transformation will create OUTPUT Group and New Group.

Union Transformation in Informatica 6

In order to merge more than one table, we need multiple groups like NEWGROUP. So, Double click on the Informatica Union transformation to create new groups. From the below screenshot you can see the list of available properties in the Transformation tab:

  • Select Transformation: By default, it will select the transformation you clicked on.
  • Rename: This button will help you to rename the union transformation to a more meaningful name.
  • Make Reusable: If you check mark this option then, this transformation will become reusable transformation.
  • Description: Please provide a valid description of this transformation.
Union Transformation in Informatica 7

Within the Groups tab, we have to define the group names. Please click on the New Group button (beside the close button) to add a new group and change the names as per your requirements.

By clicking the close button you can delete the unwanted groups. From the below screenshot you can observe that we created three groups Least Sales, Medium Sales and Highest Sales.

Union Groups 8

Once you finish creating the Groups, Click OK to close the transformation window.

Union Transformation in Informatica 9

Next, w have to assign the Source Qualifiers to the new groups that we created earlier. so, please connect the Router 2 Source qualifier with the Medium Sales and Router 3 Source qualifier with the Highest Sales 

 

Union Transformation in Informatica 19

Next, Drag and drop the target definition (Union Transformation) from Targets folder to the mapping designer and connect the Transformation with the target definition. Please use the Autolink.. option to connect them.

Union Transformation in Informatica 10

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

Create Union Transformation in Informatica Workflow

Once we finish creating the Mapping we have to create the workflow for it. PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Union Transformation example, we will create the Workflow manually. In order to create a new Workflow, Please navigate to Workflows Menu and select the Create option. This will open Create Workflow window. Please provide the unique name (wf_Union_Transformation) and leave the default settings.

Union Transformation in Informatica 11

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

Create a Union Transformation Session

There are two types of sessions: 

 

For this Informatica Union Transformation example, we are going to create Non-reusable Session. Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name (S_Union_Transformation) for the session.

Once you click on the Create button, a new window called Mappings opened. Here you have to select the mapping you want to associate with this session. From the below screenshot, you can observe that we are selecting the mapping (m_Union_Transformation) that we created earlier (in Step 3).

Union Transformation in Informatica 12

Double click on the Session Task to configure it. Although we have to configure Sources, targets, and some common properties, we are explaining only a few properties. We strictly recommend visiting the Session article to understand the remaining properties.

From the below screenshot you can observe that we assigned the $target variable to Connection Value, we check marked the Truncate target table option to truncate the existing data from the destination table.

Union Transformation in Informatica 13

From the below screenshot you can observe that the Informatica Union Transformation workflow is a valid one. Now, Let us start the Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Union Transformation in Informatica 14

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

Union Transformation in Informatica 15

Let us open the SQL Server Management Studio to check whether we successfully combined the records present in Router 1, Router 2, and Router 3 tables or not. Please refer to SQL Union All article.

Output of Union Table 16

 

 

 

Update Strategy Transformation in Informatica

The Update Strategy Transformation in Informatica is an Active and Connected transformation. It is useful to update, insert, or delete the records in a target based on source table data. And the beauty of this transformation is: you can restrict the records from not reaching into the target table.

This article explains how to configure Informatica Update Strategy Transformation. Or, the steps involved in configuring the Update Strategy to update the records in the target table. 

 

For this Informatica Update Strategy Transformation example, we are going to use the below show data (Customer Record table)

Source Table 1

And the destination table is:

Destination table 2

Update Strategy Transformation in Informatica Example

If you compare the Source table with the destination table, there are multiple changes in Email Address and Professional columns. In this example, our task is to use the Informatica Update Strategy Transformation to update the changes in the destination table. 

 

Before we start configuring the Informatica Update Strategy Transformation, First let me connect with the repository service. To do so, enter the Admin Console username and password you specified while installing the Server.

Create  Informatica Update Strategy Transformation Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this example, we are using the [Customer Record] table from the SQL Server database as our source definitions. Please refer Database Source article

Update Strategy Transformation in Informatica 3

Create Informatica Update Strategy Transformation Target Definition

Please navigate to Target Designer and define the Informatica Update Strategy Transformation Target. In this example, we are using the already created SQL table (DupCust) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition 

 

Update Strategy Transformation in Informatica 4

Create Update Strategy in Informatica Mapping

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

Update Strategy Transformation in Informatica 5

It opens the Mapping Name window to write a unique name for this mapping. Let me write m_update_trans and click the OK button.

 Update Strategy Transformation in Informatica 6

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

Update Strategy Transformation in Informatica 7

Creating Update Strategy Transformation in Informatica

To create Update Strategy Transformation in Informatica, Please navigate to the Transformation menu and select the Create.. option.

 Update Strategy Transformation in Informatica 8

Once you click on the Create.. option, Create Transformation window will open. Please select the Update Strategy Transformation from the drop-down list. Next, specify the unique name (ups_Customers) and then click on Create button

Update Strategy Transformation in Informatica 9

Once you click on the Create button, Update Strategy Transformation added to the mapping designer. 

Update Strategy Transformation in Informatica 10

Next, Drag and drop the target definition (DupCust) from Targets folder to the mapping designer

Update Strategy Transformation in Informatica 11

In this example, we want to update the changes that happened in Email Address and Professional Columns. So, drag those two fields along with Key column to the Update Strategy Transformation in Informatica

Update Strategy Transformation in Informatica 12

Double click on the Informatica Update Strategy Transformation to configure it. From the below screenshot, you can see the list of available properties in the Update Strategy Transformation tab: 

Update Strategy Transformation in Informatica 13

The below screenshot shows the list of available options in the Informatica Update Strategy Transformation Ports tab:

  Update Strategy Transformation in Informatica 14

Under the Informatica Update Strategy Transformation properties tab, we had:

  Update Strategy Transformation in Informatica 15

It will open the Expression Editor to write a custom expression. Here, we are using the DD_UPDATE expression 

 

 

Update Expression Editor 16

Click Apply and click OK to close the window.

Update Strategy Transformation in Informatica 17

Next, connect the Informatica Update Strategy transformation with the target definition using the Autolink.. option.

Update Strategy Transformation in Informatica 18

Before we close the Mapping, Let us validate the Informatica Update Strategy Transformation mapping by going to Mapping and chose the Validate option. 

 

Create Update Strategy Transformation Workflow

After we finish creating the Mapping, we have to create a workflow for it. It provides two approaches to creating a workflow.

In this Informatica Update Strategy Transformation example, we will create the Workflow manually. So, navigate to Workflows Menu and select the Create option.

Update Strategy Transformation in Informatica 19

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

Update Strategy Transformation in Informatica 20

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

Create a Session for Update Strategy Transformation

There are two types of sessions:

For this Informatica Update Strategy Transformation example, we will create a Non-reusable Session. For this, go to Tasks Menu and select the Create option. 

Update Strategy Transformation in Informatica 21

Please provide a unique name (s_update_tran) for this session. Once you click on the Create button, a new window called Mappings will open. Here, we are selecting the m_update_trans

Update Strategy Transformation in Informatica 22

Please link the Start Task with a newly created session task

Update Strategy Transformation in Informatica 23

Double click on the Session task will open the Edit Tasks window. Within Properties Tab 

Treat Source Rows as: By default, Data-Driven is selected in this case. If not, please change it to Data-Driven. Remember, the Data-Driven option means, instead of performing default insertion, it will use the Update Strategy Transformation option to load the target table.

Treat Source Rows as Data Driven 24

$Source connection value: This property will store the relational source information in the $Source variable. So, click on the Arrow we marked below, and select the SQL Tutorial as the source information.

Update Strategy Transformation in Informatica 25

$Target connection value: This property will store the relational target information in the $Target variable. So, click on the Arrow we marked below, and select the SQL Test target as the Target information.

database for Update 26

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

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created in our previous step, i.e., $Source

Source Connection Variable for Update 27

Now, we have to configure the Target Connection. So, click on the DupCust present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target

Target Connection Variable for Update 28

Next, Let me start the Informatica Update Strategy Transformation Workflow. To do so, navigate to the Workflows menu and select the Start Workflow option.

Let us open the SQL Server Management Studio to check whether we successfully performed the Informatica update strategy.

Updated Destination Table 29

 

 

Informatica Update Strategy using Session Properties

In this article, we are going to explain, How to achieve Informatica Update Strategy using Session Properties. Or, the steps involved in configuring the Session Properties to achieve the Update Strategy without using any Update Strategy Transformation with an example.

In Informatica, you can use the Session Properties to achieve the update strategy. But, this approach is one of the worst approaches in real-time. Because, instead of Lookup this will blindly update existing records (even there is no change), or insert each and every record. This approach is fine for the small table. 

For this example, we are going to use the below show data (Employee Duplicate table)

Source Table 1

And the destination table is:

Destination Table 2

As you can that the destination table has 1 record and two extra columns. These extra columns will help you to understand the problems you might face in this approach.  

 

Informatica Update Strategy using Session Properties

Before we start configuring the Session Properties, First let me connect with the Informatica repository service. In order to do so, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password, and click the Connect button.

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

Step 1: Create a Source Definition

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this example, we are using [Employee Duplicate] table from SQL Server database as our source definitions. Please refer Database Source to understand the steps involved in creating a source definition 

Informatica Update Strategy using Session Properties 3

Step 2: Create Target Definition

Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL table (Employee Dup) as our target definition. Please refer Create Target table using Source Definition to understand the steps involved in creating a target definition

Informatica Update Strategy using Session Properties 4

Step 3: Create a Mapping

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

Informatica Update Strategy using Session Properties 5

This will open the Mapping Name window to write a unique name for this mapping. Let me write m_update_with_session and click OK button.

TIP: Please refer Mapping article to understand the procedure to create Mapping

Informatica Update Strategy using Session Properties 6

Drag and drop the Employee Duplicate source definitions from Sources folder to the mapping designer. Once you drag the source, Power Center designer will automatically create the source qualifier for you. I suggest you refer the Source Qualifier Transformation article.

Next, create an Expression Transformation, and Drag all the fields from Source Qualifier to Expression Transformation. I Suggest you refer Expression Transformation article for better understanding.

Informatica Update Strategy using Session Properties 7

Double click on the Expression transformation to add new fields, or write to custom expressions. From the below screenshot you can observe that We added 2 new columns using the New Port button. We are going to use these new columns to store the Created Date and Modified Date

Informatica Update Strategy using Session Properties 8

Let us write the custom expression. To do this, Click on the arrow button beside the CreatedOn.

TIP: All these new columns are output ports. So, please check mark O

Informatica Update Strategy using Session Properties 9

This will open the Expression Editor to write a custom expression. Here, we want the system date so, write SYSDATE.

Informatica Update Strategy using Session Properties 10

From the below screenshot you can observe that We did the same for the UpdatedOn column

Informatica Update Strategy using Session Properties 11

Next, Drag and drop the target definition from Targets folder to the mapping designer, and connected the Expression transformation with the target definition. Please use the Autolink.. option to connect them.

Informatica Update Strategy using Session Properties 12

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

Step 4: Create a Workflow

After we finish creating the Mapping, we have to create a workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

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

Informatica Update Strategy using Session Properties 13

This will open Create Workflow window as shown below. Please provide the unique name (wf_update_using_session) and leave the default settings.

Informatica Update Strategy using Session Properties 14

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

Step 4(a): Create a Session

There are two types of sessions:

For this example, we will create a Non-reusable Session. In order to create the same, Please navigate to Tasks Menu and select the Create option as shown below.

Informatica Update Strategy using Session Properties 15

Please provide a unique name for this session. Here, we are naming it as s_update_using_session. Once you click on the Create button, a new window called Mappings will be opened. Here, we are selecting the m_update_with_session

Informatica Update Strategy using Session Properties 16

Double click on the Session task will open the Edit Tasks window. Within Properties Tab 

 

$Source connection value: This property will store the relational source information in $Source variable. So, click on the Arrow we marked below, and select the SQL Tutorial as the source information.

Informatica Update Strategy using Session Properties 17

$Target connection value: This property will store the relational target information in $Target variable. So, click on the Arrow we marked below, and select the SQL Test target as the Target information.

Informatica Update Strategy using Session Properties 18

Treat Source Rows as: Change the default Insert to Update. It means, instead of performing the only insertion, it will perform update too.

Informatica Update Strategy using Session Properties 19

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

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created in our previous step i.e., $Source

Informatica Update Strategy using Session Properties 20

Now, we have to configure the Target Connection. So, click on the EmployeeDup present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target

Informatica Update Strategy using Session Properties 21

Next, checkmark the Update else Insert.

Update else Insert: If the records already exist then it will perform UPDATE on that records. And, if the records do not exist then it will perform INSERT

Informatica Update Strategy using Session Properties 22

Please link the Start Task and the session task.

Informatica Update Strategy using Session Properties 23

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

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

Informatica Update Strategy using Session Properties 24

Let us open the SQL Server Management Studio to check whether we successfully performed the update strategy. If you look at the first record, this record is updated along with the insertion. In a simple language, we can say, this approach is simply replacing all the existing target table records with the source table records.

Let me update Yearly Income for EmpID 3 and add one more record.

From the below screenshot you can observe that our workflow is executed without any errors.

Informatica Update Strategy using Session Properties 27

As you can see, again all the records are inserted freshly.

 

 

 

Source Table 1

And the destination table is: 

Update Destination Table 2

Update Strategy in Informatica Example

In our previous article, we already explained the Update Strategy Transformation. In this example, we will show you another way of using this Informatica Update Strategy Transformation.

First, let me connect with the repository service. To do so, enter the Admin Console username and password you specified while installing the Server.

Create Source Definition for Update Strategy in Informatica

Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this Informatica Update Strategy example, we are using the Customer table from the SQL Server database as our source definitions. Please refer Database Source article.  

 

Update Strategy in Informatica Example 3

Create Target Definition for Informatica Update Strategy

Please navigate to Target Designer and define the Informatica Update Strategy Target. In this example, we are using the already created SQL table (New Customers) as our target definition. Please refer Create Target table using Source Definition to understand the target definition

  Update Strategy in Informatica Example 4

Step 3: Create a Mapping for Update Strategy in Informatica

To create a new Informatica Update Strategy mapping, Please navigate to the Mappings menu and select the Create.. option.

Update Strategy in Informatica Example 5

It opens the Mapping Name window to write a unique name (m_update_Cust) for this mapping and click OK button.

Update Strategy in Informatica Example 6

Drag and drop the Customer record source definitions from Sources folder to the mapping designer. Once you drag the source, the Power Center designer will automatically create the Source Qualifier for you. 

Step 3(a): Create a Lookup Transformation

To create a Lookup Transformation, Please navigate to the Transformation menu and select the Create.. option.

Update Strategy in Informatica Example 7

Once you click on the Create.. option, Create Transformation window will open. Please select the Lookup Transformation from the drop-down list and specify the unique name (lkp_Cust) and click on Create button

Update Strategy in Informatica Example 8

Once you click on the Create.. button, a Select Lookup Table for Lookup Transformation window will open. Here, we want to use the Target table as the lookup source.

TIP: If your lookup table is present in Source, then select Source. Here, you can also Import from an external source.

Update Strategy in Informatica Example 9

Clicking the Create button adds the Lookup Transformation to the mapping designer. Next, drag and drop the Customer key from Source Qualifier.

Update Strategy in Informatica Example 10

Double click on the lookup transformation to configure its settings. The below screenshot will show you the list of available options in the Ports tab. From the below screenshot, you can observe that We changed the Input port name (CustomerKey_lkp).

Update Strategy in Informatica Example 11

Within the Properties section, we changed the Lookup Policy on Multiple Match to Use First value.

Update Strategy in Informatica Example 12

Within the condition tab, we added one condition CustmerKey = CustmerKey_lkp. The below condition states that Lookup transformation will check the lookup input source (i.e., Customer Key) is equal to existing Customer Key or Not.

Update Strategy in Informatica Example 13

Step 3(b): Create an Expression Transformation

To create an Expression Transformation, select the Create.. option from the Transformation menu. As you can see, we assigned the name as Exp_Cust

Update Strategy in Informatica Example 14

Now let me add all the fields from Source Qualifier to Expression Transformation and the Key column from Lookup Transformation.

Update Strategy in Informatica Example 15

As you can see, we changed the column name (column added from lookup). Next, we would like to add one Flag field using New Column button

Update Strategy in Informatica Example 16

For this flag field, let me write an expression by clicking the Arrow. Remember, If you want to perform Delete or some other operation based on some condition, then use multiple Tags.

Update Strategy in Informatica Example 17

Here, the ISNULL is to check whether it is Null or not

Below the specified expression check whether the Customer key column coming from the lookup field is Empty or not. If it is empty, one will return otherwise 0. And the expression is IIF(ISNULL(CustomerKey_lkp), 1, 0). Please refer to IIF to understand the syntax of an IIF. 

 

Update Strategy in Informatica Example 18

Click OK to Apply the setting

Update Strategy in Informatica Example 19

Step 3(c): Creating Router Transformation

Please refer to Router Transformation article to understand the steps involved in creating it.

Update Strategy in Informatica Example 20

Once you created it, Please connect the Expression Transformation with the router transformation by dragging the required fields. From the below screenshot, you can observe that we are adding all the fields except the lookup column field.

Update Strategy in Informatica Example 21

Double click on the Router transformation to add Groups. Use Add New Group button to add required groups

Update Strategy in Informatica Example 22

From the below screenshot, you can observe that we created one group for Inserting New Records and another for Updating existing records.

Update Strategy in Informatica Example 23

Let us provide the expression or condition for the First group by clicking the arrow button. It opens the Expression Editor to write a custom expression. Here, we want the Customers whose Customer key is Null which means, non-existing records

Edit Router Expression 24

For Update group, we have written the expression as Flag = 0 which means, all the existing records

Insert and Update statements in Router 25

Once you finish configuring the properties, Click OK to close the transformation window.

 Update Strategy in Informatica Example 26

Step 3(d): Create Informatica Update Strategy Transformation

Please refer to Update Strategy Transformation in Informatica to understand the steps involved in creating it. Let me add two Update Strategies:

Update Strategy in Informatica Example 27

Drag the fields from Insert group (Flag = 1) to Insert_Cust and drag fields from Update group (Flag = 0) to Update_Cust

Update Strategy in Informatica Example 28

Double click on the Insert_Cust Update Strategy to configure it. Let me change the Update Strategy Expression to 0 or DD_INSERT

Forward Rejected Rows in Update Example 29

Double click on the Update_Cust Update Strategy to configure it. Let me change the Update Strategy Expression to 1 or DD_UPDATE for an update

Update Strategy in Informatica Example 30

Next, Drag and drop the target definition from the Targets folder to the mapping designer. Repeat the same for one more time and Auto link fields.

Update Strategy in Informatica Example 31

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

Step 4: Create a Workflow for Update Strategy in Informatica

After we finish creating the Informatica Update Strategy Mapping, we have to create a workflow for it. Power Center Workflow manager provides two ways to create a workflow.

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

Update Strategy in Informatica Example 32

It opens the Create Workflow window. Provide a unique name (wf_Customers) and leave the default settings.

Update Strategy in Informatica Example 33

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

Step 4(a): Create a Session for Update Strategy in Informatica

There are two types of sessions:

For this Informatica Update Strategy example, we will create a Non-reusable Session. Select the Create option from Tasks Menu

Update Strategy in Informatica Example 34

Please provide a unique name for this session (s_Customers). Once you click on the Create button, a new window called Mappings will open. Here, we are selecting the m_update_Cust

Update Strategy in Informatica Example 35

Double click on the Session task will open the Edit Tasks window. Within Properties Tab

$Source connection value: This property will store the relational source information in the $Source variable. So, click on the Arrow we marked below, and select the Source as the source information.

Source Database for Update Example 36

$Target connection value: This property will store the relational target information in the $Target variable. So, click on the Arrow we marked below, and select the below Target as the Target information.

Target Database for Update Example 37

Within the Mappings tab, we have to configure the Source and Target Connections for Informatica Update Strategy. First, let us configure the source connections by clicking on the SQ_Customer source present in the Sources folder.

Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created before, i.e., $Source

Update Example Source Connection variable 38

Now, we have to configure the Target Connection. So, click on the NewCustomers present in the Targets folder. Within the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target. Repeat the same for NewCustomers1

Update Example Target Connection variable 39

Next, Let me start the Informatica Update Strategy Workflow. To do so, navigate to the Workflows menu and select the Start Workflow option.

Update Strategy in Informatica Example 40

Let us open the SQL Server Management Studio to verify whether we successfully performed the update strategy or not.

Update Example Output table 41

 

 

 

 

XML Generator Transformation in Informatica

The XML Generator Transformation in Informatica is an Active and Connected transformation. This transformation is useful in generating XML files inside a pipeline.

In this article, we will show you how to use XML Generator Transformation in Informatica to generate an XML file from the Database table with an example.

 

 

For this Informatica XML Generator Transformation example, we are going to use the below show data (Customer record table)

XML Generator Transformation in Informatica 1

XML Generator Transformation in Informatica Example

Let’s see how to use this XML Generator Transformation in Informatica to generate an XML file using the SQL Database table. Before we start configuring, First, let me connect with the repository service.

To do so, we have to provide the Admin Console credentials. So, Please provide the appropriate Username and Password, and click the Connect button.  

 

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

Step 1: Source Definition for XML Generator Transformation in Informatica

Once you connected successfully, please navigate to Source Analyzer and define your Sources. In this example, we are using the Customer table from the SQL Server database as our source definitions. Please refer Database Source to understand the steps involved in creating source definition

XML Generator Transformation in Informatica 2

Step 2: Create Target Definition for XML Generator Transformation in Informatica

First Approach – Please navigate to Target Designer to define the Informatica XML Generator Transformation Target. In this example, our task is to create an XML File. So, go to the Targets menu and select the Import XML Definition option. By this, you can define the XML Definition inside a Target definition. 

 

XML Generator Transformation in Informatica 3

Ideal Approach – Go to Targets menu and select the Create option.

XML Generator Transformation in Informatica 4

Once you select the Create option, a new window called Create Target table will be displayed as shown below. Please provide a unique name for the target, and select the database type as Flat File. 

  

Once you complete, Please click on the Create button to create a new empty table in our PowerCenter Target Designer.

XML Generator Transformation in Informatica 5

Double-click on the newly created target table. Next, go to the Columns Tab to add a new column. Please select the first button (before the scissors symbol). It opens the empty row to add Column Name, Data Type

From the below screenshot, you can observe that we added one XML_Output column of a string data type.

XML Generator Transformation in Informatica 6

Now you can see the target table with one column name. It is the column that handles the XML file. 

XML Generator Transformation in Informatica 7

Step 3: Create a Mapping for XML Generator Transformation in Informatica

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

XML Generator Transformation in Informatica 8

It will open the Mapping Name window to write a unique name for this Mapping. Let me write m_xml_generator and click OK button.

TIP: Please refer Mapping article to understand the procedure to create Mapping 

XML Generator Transformation in Informatica 9

Drag and drop the Customer record source definitions from Sources folder to the mapping designer. Once you drag the Source, the Power Center designer will automatically create the source qualifier for you. I suggest you refer to the Source Qualifier Transformation article.

Step 3(a): Create a XML Generator Transformation in Informatica

To create an XML generator Transformation, Please navigate to the Transformation menu in Menu Bar and select the Create.. option.

XML Generator Transformation in Informatica 10

Once you click on the Create.. option, Create transformation window opened. Please select the XML Generator Transformation from the drop-down list and specify the unique name (XML_GenCustomer) and click on Create button 

XML Generator Transformation in Informatica 11

Once you click on the Create.. button, a new window called Import XML Definition will be opened as shown below. Here, you have to specify the XSD or XML definition for this XML file.

Local File: If the XSD file is in the local file system, then select this option.

XML Generator Transformation in Informatica 12

URL: Select the XML definition file at particular URL

XML Generator Transformation in Informatica 13

Non-XML Targets: If the source is a Non-XML file, and if it is present in the Target definition

XML Generator Transformation in Informatica 14

Non-XML Sources: If you don’t have an XSD file and want to use the SQL table in the Source definition, then select this option. For this example, we are going to use the Customerrecord table present in the Source definition.

XML Generator Transformation in Informatica 15

Click Open 

 

XML Generator Transformation in Informatica 16

Click No

XML Generator Transformation in Informatica 17

It will open an XML wizard. Click Next button

XML Generator Transformation in Informatica 18

Every XML file has to be processed using a Valid XML Definition (or XSD). Please define the XML definition in the second page. In this example, we want to save our XML file using Entity relation. So, we are selecting the first option. 

 

XML Generator Transformation in Informatica 19

Once you click on the Finish button, XML Generator Transformation added to the mapping designer.

XML Generator Transformation in Informatica 20

Now let me add all the fields from Source Qualifier to XML Generator Transformation

XML Generator Transformation in Informatica 21

Next, Drag and drop the target definition from the Targets folder to the mapping designer. Next, connect the XML Generator Transformation data output to the XML_Output field in the Target table.

XML Generator Transformation in Informatica 22

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 XML Generator Transformation in Informatica

After we finish creating the Mapping, we have to create the workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

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

XML Generator Transformation in Informatica 23

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

XML Generator Transformation in Informatica 24

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

Step 4(a): Create Session for XML Generator Transformation in Informatica

There are two types of sessions:

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

XML Generator Transformation in Informatica 25

Please provide a unique name for this session. Here, we are naming it as s_XMLGenerator. 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_xml_generator.

XML Generator Transformation in Informatica 26

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 source connections by clicking on the SQ_CustomerRecord source present in the Sources folder.

Within the Connections, click on the Arrow button beside the Relational type, and select the source table database (Source)

XML Generator Transformation in Informatica 27

Now you can see the Source as the relational connection

XML Generator Transformation in Informatica 28

Now, we have to configure the Target Connection. So, let us configure the target connection by clicking on the XMLCustomer_Records in the Targets folder.

XML Generator Transformation in Informatica 29

You can use the Transformation properties to Validate or Format the Output (generated XML) file

 XML Generator Transformation in Informatica 30

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

XML Generator Transformation in Informatica 31

Now, Let me start the Informatica XML Generator Transformation Workflow by selecting the Start Workflow option in Workflows Menu.

XML Generator Transformation in Informatica 32

Let us open the default target location of the Informatica to check whether we successfully created an XML file from the source table or not.

XML Generator Transformation in Informatica 33

You can see the data inside the xmlcustomer_records xml file.

XML Generator Transformation in Informatica 34

 

 

 

XML Parser Transformation in Informatica

The XML Parser Transformation in Informatica is an Active and Connected transformation. This transformation is useful to extract XML data from files inside a pipeline.

In this article, we will show you how to use XML Parser Transformation in Informatica to extract data from an XML file and load it into the Database table with an example. 

For this Informatica XML Parser Transformation example, we are going to use the below show XML file

XML Source file 1

XSD that we are going to use is:

XSD File 2

And the Destination table is Customer Record. As you can see, it is an Empty table  

 

XML Destination table 3

XML Parser Transformation in Informatica Example

In this article, we will show you how to use this XML Parser Transformation in Informatica to read XML data from the CSV file to the SQL Database table.

Before we start configuring, 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, and click the Connect button.

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

 

Step 1: Source Definition for XML Parser Transformation in Informatica

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

Import XML file to Sources 4

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

   Select XML File as Source Definition 5

Once you click the Open button, a new pop up window called Flat File Import Wizard will open.

XML File Import Wizard 6

Within Step 2: Under Delimiter section, please select the delimiter

 XML delimiter 7

Here, we can edit the Column Name, Data type, Length or Precision, Scale, and Width. In general, we don’t do that, but if you want, you can do it.

XML File datatype as text 8

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

XML Parser Transformation in Informatica 9

Step 2: Create Target Definition for XML Parser Transformation in Informatica

Please navigate to Target Designer to define the Target for Informatica XML Parser Transformation. In this example, we are using the existing SQL table (Customer Record) as our target definition. You can refer to Create Target table using Source Definition to understand the process of creating a target definition

 XML Parser Transformation in Informatica 10

Step 3: Create a Mapping for XML Parser Transformation in Informatica

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

XML Parser Transformation in Informatica 11

It will open the Mapping Name window to write a unique name for this Mapping. Let me write m_XMLParser and click OK button. 

TIP: Please refer Mapping article to understand the procedure to create Mapping

XML Parser Transformation in Informatica 12

Drag and drop the XML Customers flat file from Sources folder to the mapping designer. Once you drag the source, the Power Center designer will automatically create the source qualifier for you. I suggest you refer to the Source Qualifier Transformation article.

Step 3(a): Create a XML Parser Transformation in Informatica

To create XML Parser Transformation, Please navigate to the Transformation menu in Menu Bar and select the Create.. option. 

XML Parser Transformation in Informatica 13

Once you click on the Create.. option, Create Transformation window will open. Please select the XML Parser Transformation from the drop-down list and specify the unique name (XML_ParseCustomer) and click on Create button

XML Parser Transformation in Informatica 14

Once you click on the Create.. button, a new window called Import XML Definition will be opened as shown below. Here, you have to specify the XSD or XML definition for this XML file.

  • Local File: If the file is a local file system, then select this option.
  • URL: Select the file at particular URL
  • Non-XML Sources: If the source is a Non-XML file (SQL table) and if it is present in the Informatica Source definition.
  • Non-XML Targets: If the source is a Non-XML file, and if it is present in the Informatica Target definition

Please select the CustomerXSD.xml file from your local file system and click the Open button.  

 

XML Parser Transformation in Informatica 15

Click Yes or No as per your requirement

XML Parser Transformation in Informatica 16

If you select Yes from the above screenshot then the following window opens. Change XML Views Creation and naming Option will be displayed. Please change the options as per your requirements.

XML Parser Transformation in Informatica 17

It will open an XML wizard. Click Next button 

XML Parser Transformation in Informatica 18

Every XML file has to be processed using a Valid XML Definition (or XSD). Please define the XML definition in the second page.

In this example, we are using the Entity relation XSD. So, we are selecting the first option.

XML Parser Transformation in Informatica 19

Once you click on the Finish button, XML Parser Transformation in Informatica workspace added to the mapping designer.  

 

XML Parser Transformation in Informatica 20

First, let me add the XML field from Source Qualifier to XML Parser Transformation. Next, Drag and drop the target definition from the Targets folder to the mapping designer.

XML Parser Transformation in Informatica 21

Next, connect the XML Parser Transformation fields to the Customer record Target table.

XML Parser Transformation in Informatica 22

Step 4: Create a Workflow for XML Parser Transformation in Informatica

After we finish creating the Mapping, we have to create the workflow for it. Power Center Workflow manager provides two approaches to create a workflow.  

 

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

XML Parser Transformation in Informatica 23

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

XML Parser Transformation in Informatica 24

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

 

Step 4(a): Create Session for XML Parser Transformation in Informatica

There are two types of sessions:

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

XML Parser Transformation in Informatica 25

Please provide a unique name for this session. Here, we are naming it as s_XMLParseCustomer. 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_XMLParser.

XML Parser Transformation in Informatica 26

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 set the Source connection by clicking on the SQ_XMLCustomers present in the Sources folder.

  • Source File directory: It will use the default directory, but you can change the directory by giving the full path. For example, D:\File Examples\
  • Source filename: It will automatically detect. If not, please specify the file name along with the extension.
XML Parser Transformation in Informatica 27

Next, we have to configure the target connection. So, select the CustomerRecord under the targets folder.

Within the Connections, click on the Arrow button beside the Relational type, and select the target table database (Target)

Target Database for XML 28

Change the Target Load type based on your requirement

XML Parser Transformation in Informatica 29

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

XML Parser Transformation in Informatica 30

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

XML Parser Transformation in Informatica 31

Let’s open the SQL Server Management Studio and write following SQL Query to check whether we successfully transfered XML data into the table or not.

XML Parser Transformation in Informatica 32

 

 

 

XML Source Qualifier in Informatica

The XML Source Qualifier in Informatica is an Active and Connected transformation. While reading the XML Source definition, this is the default transformation generated by the Power Center Designer.

Informatica XML Source Qualifier transformation determines how the Power Center reads the source data. Remember, XML Source Qualifier always has one input port or one output port. 

For this Informatica XML Source Qualifier Transformation example, we use the below XML and Load Data to SQL Server.

XML Source Qualifier in Informatica 2

XML Source Qualifier in Informatica Example

Before we start configuring the Informatica XML Source Qualifier, 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 it and click the Connect button.  

 

Step 1: Create Source Definition for XML Source Qualifier in Informatica

Please navigate to Source Analyzer to define your Sources. As we said before, we are using the XML file present in the local File System as our source definitions. So, Please navigate to Source menu and select the Import XML Definition.. option as shown below

XML Source Qualifier in Informatica 2

Once you choose the Import XML Definition.. option, a new window called Import XML Definition opened. We have already explained these option in XML Parser Transformation.

XML Source Qualifier in Informatica 3

Please select the xmlcustomer_records.xml file from your local file system. 

 

XML Source Qualifier in Informatica 4

Click No

XML Source Qualifier in Informatica 5

It opens an XML wizard. Click Next button

   XML Source Qualifier in Informatica 6

Every XML file has to be processed using a Valid XML Definition (or XSD). Please define the XML definition in the second page.

In this example, we are using the XML file with Entity relation so, we are selecting the first option. If you are using an XML file Hierarchies, then select the second option, etc.

 XML Source Qualifier in Informatica 7

From the below screenshot you can observe that, you can see our newly created XML Source definition in Informatica

XML Source Qualifier in Informatica 8

Step 2: Create Target Definition for XML Source Qualifier in Informatica

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

XML Source Qualifier in Informatica 9

Step 3: Create Mapping for XML Source Qualifier in Informatica

To create a new mapping for XML source qualifier transformation in Informatica, Please navigate to the Mappings menu in Menu Bar and select the Create.. option.

XML Source Qualifier in Informatica 10

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

TIP: Please refer Mapping article to understand the procedure to create Mapping 

XML Source Qualifier in Informatica 11

Step 3(a): Create XML Source Qualifier Transformation in Informatica

Drag and drop the XML source definition (xmlcustomer_records) from the Sources folder to the mapping designer. Once you drag the source, the Power Center designer automatically creates the XML source qualifier transformation for you.

XML Source Qualifier in Informatica 12

Let me remove the XML Source Qualifier

Step 3(b): Create Informatica XML Source Qualifier Transformation Manually

To explicitly create XML Source Qualifier in Informatica, Please navigate to the Transformation menu in Menu Bar. Next, select the Create.. option 

XML Source Qualifier in Informatica 13

Selecting the Create.. option will open the Create Transformation window. Please select the XML Source Qualifier Transformation from the drop-down list and provide the unique name (XMLCustomers_SQ) for this transformation and click on Create button

XML Source Qualifier in Informatica 14

That opens the Select Sources for Source Qualifier Transformation window. Click OK to select the xmlcustomer_records as the source.

XML Source Qualifier in Informatica 27

Now you can see the same image that you have seen before 

XML Source Qualifier in Informatica 28

Double click on the XML Source Qualifier transformation to witness and alter the properties. Below screenshot shows you the list of available properties in the Transformation tab:

  • Select Transformation: By default, it will select the transformation you chose (or clicked on). 
  • Rename: This button helps you to rename the XML Source Qualifier transformation name.
  • Description: Use this space to provide a valid description of this transformation.
XML Source Qualifier in Informatica 15

Below screenshot show you the available options in the Ports tab:

   XML Source Qualifier in Informatica 16

Next, Drag and drop the target definition (XMLCustomers) from the Targets folder to the mapping designer. Next, connect the XML source qualifier Transformation with the target definition. Please use the Autolink.. option to connect them.  

 

XML Source Qualifier in Informatica 17

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 XML Source Qualifier in Informatica

After you finish creating the Mapping, we have to create the workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

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

 

XML Source Qualifier in Informatica 18

It will open the Create Workflow window as shown below. Please provide the unique name (wf_XMLSource) and leave the default settings.

XML Source Qualifier in Informatica 19

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

Step 4(a): Create Session for XML Source Qualifier in Informatica

There are two types of sessions:

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

XML Source Qualifier in Informatica 20

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

XML Source Qualifier in Informatica 21

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 Source connection by clicking on the XMLSQ_xmlcustomer_records present in the Sources folder.

  • Source File directory: It will use the default directory, but you can change the directory by giving the full path. For example, D:\File Examples
  • Source filename: It will automatically detect. If not, please specify the file name along with the extension.
XML Source Qualifier in Informatica 22

Next, we have to configure the target connection. So, select the XMLCustomers under the targets folder. Within the Connections, click on the Arrow button beside the Relational type, and select the target table database (Target)

XML Source Qualifier in Informatica 23

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

XML Source Qualifier in Informatica 24

Now, Let me start the XML source qualifier transformation Workflow by selecting the Start Workflow option in Workflows Menu.

XML Source Qualifier in Informatica 25

Let us open the Management Studio and write following SQL Query to check whether we successfully transferred data from XML source to database table or not.

XML Source Qualifier in Informatica 26

 

 

Pre SQL and Post SQL in Informatica

In this article, we are going to explain, How to use Pre SQL and Post SQL in Informatica. Or, the steps involved in configuring the Pre and Post SQL in Source Qualifier Transformation with an example.

For this Informatica Pre and Post SQL example, we are going to use the below show data (EmpDetails table)  

 

Pre and Post Source

And the Destination table is Pre and Post SQL Employees. As you can see, it is an Empty table

  Destination Table

Pre SQL and Post SQL in Informatica Example

Before we start configuring the Pre and Post SQL in Informatica, First connect to the Informatica repository service by providing the Admin Console  Username and password that you specified while installing the Server.

Create Pre and Post SQL in Informatica Source Definition

Navigate to Source Analyzer and define your Sources. Here, we are using the EmpDetails table from the SQL Server database as our source definitions. I suggest you refer to Database Source to understand the creation of the source definition  

 

Pre and Post Source Analyzer

Create Pre and Post SQL in Informatica Target Definition

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

Pre and Post Target Designer

Create Informatica Pre and Post SQL Mapping

To create a new mapping, Please navigate to the Mappings menu and select the Create.. option. It opens the Mapping Name window to write a unique name ( m_Pre_and_Post) and click the OK button.

Pre and Post Mapping 5

Drag and drop the EmpDetails source definitions from Sources folder to the mapping designer. Once you drag the source, the Power Center designer will automatically create the Source Qualifier for you.

Pre and Post Mapping Designer

Double click on the Source Qualifier transformation, and go to properties Tab to configure the Informatica Pre and Post SQL

Pre: This property is used to run the Command against the Source before the Integration Service Starts. Click the arrow

Pre and Post SQL in Informatica 7

Here we are writing an Insert Statement to insert new records into the Emp Details table before the integration service starts.

Pre Query

Post: Use this property to run the Command against the Source After the Integration Service Ends. Here, we are writing a Delete Statement to delete the record whose employee Id is equal to 9

Post Query Delete Statement

You can also alter the remaining properties. But for now, we are clicking OK button to close the properties windows

Pre and Post SQL in Informatica Editor

Next, Drag and drop the target definition from Targets folder to the mapping designer. Next, join the source qualifier Transformation with the target definition using the Autolink.. option.

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

Save Pre and Post SQL in Informatica Mapping

Create Informatica Pre and Post SQL Workflow

After we finish creating the Informatica Pre and Post SQL Mapping, we have to create the workflow for it. Power Center Workflow manager provides two approaches to create a workflow.

In this example, we will create the Workflow manually. First, navigate to Workflows Menu and select the Create option will open Create Workflow window. Please provide the unique name (wf_Pre_and_Post) and leave the default settings. 

 

Create Workflow for Pre and Post SQL in Informatica

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

Create Session for Pre and Post SQL

There are two types of sessions:

For this Informatica Pre and Post SQL example, we created a Non-reusable Session and named it as s_Pre_and_Post for the session.

Create Pre and Post SQL in Informatica Session

Please link the Start Task, and the Session Task. Next, navigate to Workflows Menu and select the Validate option to validate the Workflow. From the below screenshot, you can observe that the workflow is a valid one.

Start Pre and Post SQL in Informatica Workflow

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

Let us open the Server Management Studio. As you can, it has 16 records: 15 from EmpDetails table, and 1 records from Insert Statement in Pre SQL

Pre SQL Result

If you observe the original Table after the Integration process. There are 15 records

The Delete Statement in Post deleted the record with EmpID 9, and The Insert Statement in Pre SQL inserts new records.

Pre and Post Result