Informatica: Remove Hash from output file Header

While generating output file in informatica, we often need to have column headers same as mentioned in our mapping target.
To do so, we need to set target property
Header Options = Output Field Names

After setting the property as above we will have '#' sign in header at the start as mentioned below.
#Col1,Col2,Col3

Now we can remove this '#' sign by using 1 of following 2 ways.

  1. Set Custom Property
  2. Use Header Command Output
Set Custom Property:
This is the simple and clean way to remove '#' sign. Simply open session task in edit mode and select Config Object Tab and set Custom Property = RemoveOutputHeaderHash=YES; as shown below.


Use Header Command Output:
In this way open session task à Mapping Tab à Select Target and set property
Header Options = Use Header Command Output
Then also set Header command property
Header Command = echo Col1,Col2,Col3
As shown below.

In this way, we can rename output columns as well as can increase and decrease header columns independent of Target columns.

Comments