Forum Discussion

Mari's avatar
Mari
New Contributor
7 years ago

Remove Footer - FIxed width file

I am trying to load the data from fixed width flat file. In Fixed-Width Parser snap i can able to remove header through skip option. But can i know , is there any possible way to remove the footer ?

4 Replies

  • This one’s been sitting here for a while and was never answered, but I’m having a similar issue. I’m wondering how to remove the last row(s) from a file.

  • Would the Tail snap be helpful for either of your cases? If you were certain that the number of rows in the file wouldn’t surpass a certain limit, then you could do something like this.

  • Hi Mari/Davis,

    Good day, you can try to maximize the Ignore Lines properties of the Fixed width parser.

    e.g.

    I assumed that the footer is an empty line? you can use the regex ^(?![\s\S])

    But this is a kinda global thing, it will ignore all empty lines 🙂

    • This is the correct solution. I’ve used this solution for fixed width but didn’t even realize it could be used for CSV files too. I’ll give it a shot.