How to get first and last record from a table/file?
Step 1: Drag and drop ports from source qualifier to two rank transformations.
Step 2: Create a reusable sequence generator having start value 1 and connect the next value to both rank transformations.
Step 3: Set rank properties as follows
Step 4: Make two instances of the target.
Step 5: Connect the output port to target.