extract header and footer info from fixed width file
Moderators: chulett, rschirm, roy
extract header and footer info from fixed width file
Hi,
My requirement is:
Source: Fixed width file
Target:Fixed width file
Source file contains header and footer, i need to store that info into a table(staging), and include them while loading into target fixed width file.
Could anybody give me an idea how to proceed with this requirement?
Thanks in Advance,
snt_ds
My requirement is:
Source: Fixed width file
Target:Fixed width file
Source file contains header and footer, i need to store that info into a table(staging), and include them while loading into target fixed width file.
Could anybody give me an idea how to proceed with this requirement?
Thanks in Advance,
snt_ds
snt_ds
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Well personally I would use a unix script to get the header and trailer records from the input files. (You could store them in a file or load them to a table).
I would then process the incoming files using a file pattern and a column name field and use an external target stage to generate variable file names.
Once you have finished processing you would write another unix script to append the header and trailer records back to their respective files.
I would then process the incoming files using a file pattern and a column name field and use an external target stage to generate variable file names.
Once you have finished processing you would write another unix script to append the header and trailer records back to their respective files.
Oh sorry ..Here i assumed that there are identifiers to identify the header and trailer records .
ShaneMuir wrote:How would you identify the header record and the trailer record?nagarjuna wrote:Hi ,
Read the entire file in a varchar column and mention constraints in transformer directing header into one link , trailer into another link and rest of the data into 3rd link.
Nag
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am