I am having flat file containing Header, Footer and data. I want to load Header into one target file (t1). Footer into another target file(t3). Data into another target file(t2).
Help me in this regard...
is header and footer having constant values like welcome and end or any change?
If it is constant then in expression flag record based on condition ='Welcome' then H ='End' then 'T' else 'V'. using router you can load data in respective targets.
Hi Veeru Thanks for your reply ....Can u please clearly explain with logic.
The Header is
Welcome to India......
The Header is increasing dynamicaly as many rows..please give an approach
If you are sure that 'WELCOME' keyword will come all the day as a header and 'END' keyword as a footer .
Then you can use instr ,substr function in Router condition to route the header and footer and the data
This link may help you
You can use pre session commands to prepare three source files from the original file.
1. Using head command in unix you can extract the header records and store them in head_<filename>
2. Using tail command you can extract the footer and store in footer_<filename>
3. Using sed you can extract data and store in data_<filename>
If your target is files again, you would not need informatica mappings.
If your target is db, the mapping can use three source files created in above step.
might help for future readers:
I have implement by Reversing the content of file.
You might find the below Informatica Marketplace solutions useful. You can also find more mapping examples and other useful utilities at the same website.
Bharath B S