Tuesday, 13 December 2016

How to read flat file source that contains carriage return in one of its columns.

Reading Carriage return as a part of Column value from flat files.

If you face any issue while reading data from flat file which contain carriage return as a part of data.Then look into this post you can solve it.

Consider the following Pipe delimited flat file which contains 3 rows, but if you observe that the 2nd row contains  carriage return because of this informatica reads second row as 2|"test  and 3rd as row2"|4

                         Field1|Field2|Field3
                          1|"test row"|3
                          2|"test CR
                                   row2"|4
                          3|"test row3"|5



To sole this issue we need to read 2nd row 2nd field as "test CR      row2".
For this Informatica provides an easy way. Just follow the below steps to sole your issue.

1) Go to Informatica session and open it.
2) Click on Config Object.
3) Under Advanced section go to Custom Properties and click on Value. See the below picture.

4) After Clicking on Value you can see the below popup.


5) Now add new attribute value as below.
Attribute:- MatchQuotesPastEndOfLine

Value:- Yes
6) Click OK and save the session and execute your workflow.Now you can able to read the data from the file perfectly.

Hope you solved your problem with this solution . Share it with your colleagues if you like it . 
Share the knowledge that will enhance your skills.
Please enter the comments for any doubts and details.

Sunday, 11 December 2016

How to Handle HASH (#) in INFORMATICA Target File Header



HOW TO REMOVE THE HASH (#) SYMBOL FROM informatica Target file header 

In Informatica when ever we write data into flat file with header then we will receive a '#' symbol as first character in the file , In general to remove this hash people do lot of things at UNIX level.
However lot of people not aware of Informatica custom properties , which are actually very helpful.So let's see how we can remove # by using custom properties.
Follow Below steps to remove the # from header row.
1) Go to Informatica session and open it.
2) Click on Config Object.
3) Under Advanced section go to Custom Properties and click on Value. See the below picture.

4) After Clicking on Value you can see the below popup.

5) Now add new attribute value as below.
Attribute:- RemoveOutputHeaderHash
Value:- Yes

6) Click OK and save the session and execute it and see the target file header. You don't find the # symbol.
Above steps provide an elegant solution to a commonly occurring problem which many people solve using post processing or custom header generation.
Hope you solved your problem with this solution . Share it with your colleagues if you like it . 
Share the knowledge that will enhance your skills.
Please enter the comments for any doubts and details.