In Informatica there is a very handy option to automatically generate column names as a header row in the flat file output. This option serves its purpose except for the fact it places a “#” (hash) symbol at the beginning of the header row by default.
And, it seems there is no easy way to remove this hash symbol. Many solutions incorporate either generating the header row in a separate pipeline in the mapping or remove the hash by post process batch or shell script.
However, there is a hidden option in Informatica session properties which can do this without breaking any sweat. Unfortunately this option is only available in Informatica versions starting from 9.1.0 HotFix 4
Below are the steps to enable that option to remove the hash symbol while generating the header row. (Assuming the “Output Field Names” option is selected for the Header Options attribute in Target Properties section of the Mapping tab)
1. Open the Informatica Session in edit mode
2. Goto Config Object tab
3. Open the value field for the “Custom Properties” attribute in Advanced section
4. Create a new attribute value pair with below details
5. Click Apply and Ok. Save the session and execute it and you will notice the # symbol has now vanished
Above steps provide an elegant solution to a commonly occurring problem which many people solve using post processing or custom header generation.
Hopefully this trick saves some of your valuable time. Stay tuned for more tips and tricks to get the most out of Informatica Powercenter.
You can write to me at firstname.lastname@example.org or follow me on twitter @atalraghav
Comments are always welcome.