Discussion:
Removing header/footer from an input file (schema/pipeline)
(too old to reply)
DaBeef
2008-05-01 18:36:09 UTC
Permalink
Hello all,

I am trying to remove the header/footer information from a position
delimitted file I receive. I am unsure if the header/footer length
will change. Is there a way to simply remove these last two lines and
only focus on the rest of the data

Line
1 ignore
2-end-1 read
end ignore

I have been banging my head against the wall and nay help is greatly
appreciated.

thnx
Thiago
2008-05-01 21:12:09 UTC
Permalink
Hi,

Define separate flat file schemas for the header, body, and footer. On your
pipeline's flat file disassembler select them on their respective properties.
Set the Preserve header property of the flat file disassembler to false so
that the header is left behind. Here is an example:
http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx


Hope it helps!

Thiago Almeida
http://connectedthoughts.wordpress.com
Post by DaBeef
Hello all,
I am trying to remove the header/footer information from a position
delimitted file I receive. I am unsure if the header/footer length
will change. Is there a way to simply remove these last two lines and
only focus on the rest of the data
Line
1 ignore
2-end-1 read
end ignore
I have been banging my head against the wall and nay help is greatly
appreciated.
thnx
Roch Baduel
2008-05-02 07:53:00 UTC
Permalink
Hello,
Another way to do it, if you do not use header/footer and/or if you are not
sure of the format, is to use a very simple custom pipeline component.
From my understanding, your file has CR/LF between lines. You can build a
component wich reads line from the input stream (using for example a
streamreader), filters lines and outputs them to a stream (with a
streamwriter for example).

Regards,
Roch
Post by Thiago
Hi,
Define separate flat file schemas for the header, body, and footer. On your
pipeline's flat file disassembler select them on their respective properties.
Set the Preserve header property of the flat file disassembler to false so
http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx
Hope it helps!
Thiago Almeida
http://connectedthoughts.wordpress.com
Post by DaBeef
Hello all,
I am trying to remove the header/footer information from a position
delimitted file I receive. I am unsure if the header/footer length
will change. Is there a way to simply remove these last two lines and
only focus on the rest of the data
Line
1 ignore
2-end-1 read
end ignore
I have been banging my head against the wall and nay help is greatly
appreciated.
thnx
Loading...