XML
Generator is an Active and Connected transformation.
XML
Generator transformation is use to create XML inside a pipeline. The XML
Generator transformation lets you read data from messaging systems, such as
TIBCO and MQ Series, or from other sources, such as files or databases. The XML
Generator transformation functionality is similar to the XML target
functionality, except it generates the XML in the pipeline.
The XML Generator
transformation accepts data from multiple ports and writes XML through a single
output port.
An
XML Generator transformation to combine input that comes from several sources
to create an XML document.
For
example, you might want to extract data from relational sources and pass XML
data to targets or transformation to combine the XML data from two TIBCO
sources into one TIBCO target. One source might contain employee and salary
information, and the other might have employee phone and email information.
The
XML Generator transformation is similar to an XML target definition. When the
Integration Service processes an XML Generator transformation, it writes rows
of XML data. The Integration Service can also process pass-through fields
containing non-XML data in the transformation.
The
XML Generator transformation has one or more input groups and one output group.
The output group has one port, “DataOutput,” which generates a string data BLOB
XML document. The output group contains the pass-through port when you create
pass-through fields.
Sample Mapping:
1.
Connect and Open the folder if not already opened.
2.
Select Tools --> Mapping Designer
3.
Select Mappings --> Create
It
will pop-up "Mapping Name". Enter the mapping name of your
choice" and Click on 'OK'. Example: m_emp_xml_generator
4.
Drag the Source and Target definitions into workspace if they are already
exist. If not click here to know how to create or import Table definitions.
5.
Select 'Transformation' from Menu --> Create
a) That
will appear you 'Select the transformation type to create:'
b) Select
'XML Generator' from drop down and 'Enter a new name for this transformation:'
as "xml_Gen_EMP"
c)
Click 'Create' then it will pop-up 'Import XML Definition'
d)
Select 'Non-XML Source' as above and Select Scott.EMP and click on >>
e)
Select Scott.EMP from right side window 'Selected Source' and click on 'Open'
f)
Click on No
g) XML
Wizard (step 1) will pop-up then click 'Next'
h)
Select 'Entity Relationships', Click 'Finish' and Click 'Done'
or
b)
Click in the workspace in Mapping Designer then it will pop-up 'Import XML
Definition'
c)
Select 'Non-XML Source' as above and Select Scott.EMP and click on >>
d)
Select Scott.EMP from right side window 'Selected Source' and click on 'Open'
e)
Click on No
f)
XML Wizard (step 1) will pop-up then click 'Next'
g) Select
'Entity Relationships' and Click 'Finish'.
h)
Select ' EMP1' XML Generator transformation in workspace and Right Click -->
Edit.
i)
In Transformation tab --> Click on 'Rename' highlighted above which will
pop-up 'Rename Transformation'. Enter the Transformation Name:
"xml_Gen_EMP"
j)
Click on 'OK'
k)
Click on 'Apply' and 'OK'.
6).
Drag required ports from 'SQ_EMP' Source Qualifier to 'xml_Gen_EMP' XML
Generator Transformation.
7)
Select 'xml_Gen_EMP' XML Generator Transformation and Right Click --> Edit
--> Midstream XML Generator tab.
Note:
You can modification 'XML Generator transformation' as per your requirement
need. If you have any idea on XML Editor and XML definitions.
9)
Select 'Mapping' from Menu --> Validate.
10)
Select 'Repository' from Menu --> Save.
Note:
Import settings at session level.
1.
Edit the session
2.
Go the Mappings Tab
3.
Select 'XML Generator transformation' from Navigator from Transformations
section.
a)
Check 'Format Output'. If you want output file in XML format.
b)
Check 'Validate Output'. If you want to validate XML view.
HI created one mapping by following these steps but data was not loading into the flatfile.
ReplyDeleteany idea how to improve the performance for this transformation?
ReplyDeleteHave you created xML with attributes? I have not been able to loacte actual sample for creating xml attributes. Like ARM - Tocquigny
ReplyDelete