XML Source qualifier Transformation in Informatica
XML Transformation in Informatica
The XML Parser transformation lets you extract XML data from messaging systems, such as TIBCO or MQ Series, and from other sources, such as files or databases. The XML Parser transformation functionality is similar to the XML source functionality in Informatica,except it parses the XML in the pipeline.
Types of XML Transformations:
-XML Source Qualifier Transformation
-XML Parser Transformation
To get Informatica Live Training, please visit: https://tekslate.com/informatica-training/
Source Qualifier Transformation in Informatica
It is an active transformation, as well as connected transformation. Just like the normal SourceQualifier Transformation we can use the XML Source Qualifier Transformation by dragging an XML source definition to the Mapping Designer workspace or by manually creating one. The source definition needs to be connected to the target via XML Source Qualifier Transformation. This Source qualifier defines the data elements that the Integration Service reads when it executes a session.
XML Source Qualifier has one input or output port for every column in the source. If you remove an XML source definition from a mapping, the Designer also removes the corresponding XML Source Qualifier transformation.XML Parser Transformation It’s an also active transformation, as well as Connected. We use an XML Parser transformation to extract XML inside a pipeline and then pass this to the target. The XML is extracted from the source systems such as files or databases.
The XML Parser transformation reads XML data from a single input port and writes data to one or more output ports.XML Generator Transformation Overview: It’s an also active transformation, as well as connected. We use XML Generator Transformation Overview to create XML inside a pipeline. It reads data from source such as files and databases and generates XML in the pipeline. The XML Generator transformation accepts data from multiple ports and writes XML through a single output port.
This is type passive transformation which allows you to read the data from XML files
Every XML source definition by default associated with XML source qualifier transformation.
XML Source Qualifier Transformation Example
Creation of the source definition
From tool menu select source analyzer
From source menu click on import XML definition
Browse to the location of an XML file with the files of type. XML
Select EMP.XML file click on open ,click yes
Click ok, click next
Select hierarchy relation ship, select de normalized XML views
Click on finish from repository menu click on save
Create a target definition with the name EMP –XML (oracle)
Create mapping with the name M_ XML _source
Drop source and target definitions
From XML source qualifier connect the ports to target
Create a session with the name S _ M _XML _ source
Double click the session select the mapping tab from left pane select XML.SQL_ EMP
In a properties section set the following attributes
|Source file directory||C:/XML|
|Source file name||Emp.XML|
|Source file type||Direct|
From left pane select the target set the type normal
Click apply, click ok
These core tutorials will help you to learn the fundamentals of Informatica. For an in-depth understanding and practical experience, explore Informatica Training Online.
Properties of Source Qualifier
-Source Filter – Using the source filter property you can filter the number of source records. For example, you want to fetch only the employees of deptno 10, then you can enter the filter condition deptno=10 in source filter property and execute the data.
-Number for sorted ports – In source qualifier transformation, you can also sort the input records based on the ports number. So when the data is passed on to the transformations inside the mapping, it will read the port number and sort the data accordingly.
As data can be sorted based on a single or multiple ports, you have to give the number of ports which will be used in sorting. If you give value as 1, then only empno data will be sorted. If you give value as 2 then on empno and ename on both columns data will be sorted.
-Select Distinct – you can fetch only distinct records from the source using this property. When you select the select distinct option, only distinct combination of source data will be fetched by source qualifier.