Link to home
Start Free TrialLog in
Avatar of Shalver
Shalver

asked on

Removing trailer from text file SSIS package

C--Users-sshah-Desktop-Removing-Tra.docxHow can I remove trailer from a text file using SSIS package? My file has a header and footer. I am able to remove the header by skipping  the first row in the flat file source. I have started it by creating a script component. I have attached screen shots of what the SSIS package currently looks like . I need some assistance to write the script component to exclude the trailer to go into the database.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Have you tried using a Conditional Split with expression that uniquely identifies the footer, and then continue processing in the path that is the 'everything except the footer'?
Another possibility is if you're using a 'staging' table and inserting all rows to it, do an Execute SQL task after that insert to delete the footer row(s).
ASKER CERTIFIED SOLUTION
Avatar of Shalver
Shalver

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shalver
Shalver

ASKER

I was able to figure it out .