Custom Properties in Informatica Session Config Properties for XML targets and parsing
a) XMLAnyTypeToString
Noticed that when I was passing the below XML string to a web service consumer transformation in Informatica the characters such as < , “, & were getting replaced by some other characters like & and the xml string was not sent in a proper format to the web service transformation. Later fixed this by setting the XMLAnyTypeToString=Yes in the session properties as shown in the screenshot. XMLAnyTypeToString=Yes setting makes the characters be passed as it is.'<Batch OnError="Continue">
<Method ID="1" Cmd="Update">
<Field Name="ID">1</Field>
<Field Name="Name">John</Field>
</Method>
</Batch>'
Other XML customizations related settings that are available are listed below and can be set as show in screenshot above:
b) WriteNullXMLFile
If you do not want an XML output file to be generated when there is no input date then use the session property WriteNullXMLFile=No. If you do not set this property then a default xml with some meta data is created when there is no input data.c) SuppressNilContentMethod
If the child tags have no values and you might see parent tags with no child tags depending on the properties you have set for the XML target. If you want to suppress the parent tags then use the session property SuppressNilContentMethod=ByTreed) XMLWarnDupRows
Similarly if you are seeing huge session logs being generated from duplicate row warning then setting session XMLWarnDupRows=No will remove those warnings from the session log.Found more properties here : http://www.cifconsult.com/?p=743
More XML customizations in Informatica can be done in the session- mapping-target/xml parser transformation configuration: The setting shown in yellow highlights will decide the outcome of your xml.
No comments:
Post a Comment