This post describes another way of loading the first and last rows. This time using the aggregator transformation. Please see my previous post if you want to know how to do this using a Rank Transformation.(Using Rank Transformation)
Here we are going to use the default behaviour of the Aggregator transformation to get the last row from the file. In an aggregator if you do not specify any group by port it lets pass only the last row from the complete dataset.
Therefore create two pipelines from the source one to find first row similar to the way we did in the mapping with Rank transformation and second to feed an aggregator without any group by port to get the last row.
Use an Union transformation to combine the two dataflows and connect it to a target.
This will give you the simplest way of finding first and last row from a source file.
Let me know if you need any more information in the comments below.