Users Online

· Guests Online: 138

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Informatica Tutorial on Transformations

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

 

 

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: 1.15 seconds
10,816,496 unique visits