Users Online

· Guests Online: 145

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Informatica Data Connection

 

Move Data from SQL Server to another in Informatica

 

 

 

In this article, we will show you, How to Move Data from SQL Server to another in Informatica with an example. For this example, we are going to use the below show data (Customers table)

 

Move Data from SQL Server to another in Informatica 1 

and the Destination table is Duplicate Cust. As you can see, it is an Empty table

Move Data from SQL Server to another in Informatica 2

 

Move Data from SQL Server to another in Informatica

Before we start configuring the Informatica to Move Data from one SQL ServerDatabase to another database. First, connect to Informatica repository service by providing the Informatica Admin Console credential.

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

Step 1: Create a Source Definition

Once you connected successfully, Please navigate to Source Analyzer to define your Sources. As we said before, we are using Customers table from SQL Server database as our source definitions. So, go to the Source menu and select the Import from Database.. option as shown below.  

 

 

Move Data from SQL Server to another in Informatica 3

Please select the ODBC connection that will connect the Informatica with the SQL Tutorial Database. In order to create a new one, please refer Informatica ODBC Connection article.

From the below screenshot you can observe that we are selecting the Customers table from our SQL Tutorial database.

Move Data from SQL Server to another in Informatica 4 

This will add the table definition (Column Names and appropriate data types) inside our workspace under the Source Analyzer. Please refer Database Source to understand the creation of source definition

Move Data from SQL Server to another in Informatica 5

Step 2: Create 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. So, go to the Targets menu and select the Import from Database.. option as shown below.

Move Data from SQL Server to another in Informatica 6  

 

 

Please select the ODBC connection that will connect the Informatica with the SQLTest Database. In order to create a new one, please refer the Informatica ODBC Connection article.

From the below screenshot you can observe that we are selecting the DeplicateCust table from our SQLTest database. You can refer to Create Target table using Source Definition to understand the process of creating a target definition

Move Data from SQL Server to another in Informatica 7

 

Step 3: Create Mapping to move data from one Database to another

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

Move Data from SQL Server to another in Informatica 8

This will open the Mapping Name window to write a unique name for this mapping. Let me write m_move_data_from_SQL_to_sql and click OK button. 

 

TIP: Please refer Informatica Mapping article to understand the procedure for creating Mapping

Move Data from SQL Server to another in Informatica 9

Drag and drop the Customers 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 Source Qualifier Transformation article

Next, Drag and drop the target definition from Targets folder to the mapping designer. Next, connect the source qualifier 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.

Move Data from SQL Server to another in Informatica 10

Step 4: Create a Workflow to move data from one SQL Server to another

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 example, we will create the Workflow manually. To do so, Please navigate to Workflows Menu and select the Create option.

Move Data from SQL Server to another in Informatica 11

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

Move Data from SQL Server to another in Informatica 12

This will create a Workflow for you

Move Data from SQL Server to another in Informatica 13

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

Step 4(a): Create Session to move data from one Database to another Database

There are two types of sessions in Informatica:

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

Move Data from SQL Server to another in Informatica 14

Name it as s_move_data_from_sql_to_SQL.

Move Data from SQL Server to another in Informatica 15

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

Move Data from SQL Server to another in Informatica 16

Please link the Start Task, and the Session Task.

Move Data from SQL Server to another in Informatica 17

Double click on the Session task will open the Edit Tasks window. Within Properties Tab, we have two common properties that we have to configure for the relational databases.

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

Move Data from SQL Server to another in Informatica 18

$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.

Move Data from SQL Server to another in Informatica 19

Within the mappings tab, we have to configure the Source, target Connections and some common properties. First, let us configure the source connections by clicking on the SQ_Customers 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

Move Data from SQL Server to another in Informatica 20

Now, we have to configure the Target Connection. So, let us configure the target connection by clicking on the DuplicateCust present in the Targets 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., $Target

Move Data from SQL Server to another in Informatica 21

We are changing the Target Load Type to Normal.

Move Data from SQL Server to another in Informatica 22

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, Informatica 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.

Move Data from SQL Server to another in Informatica 23

Let us open the SQL Server Management Studio to check whether we successfully transfer the data from a source or not.

Move Data from SQL Server to another in Informatica 24

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.88 seconds
10,811,108 unique visits