Processing rows differently based on the row number
There will be some situations where you will need to process the data differently depending on the position or number of each row.
Let's assume that you have a bookstore and want to know the top five bestsellers books, the following 10 bestsellers, and the rest of the books for different purposes (for example, to do a differentiated marketing promotion for each group). To do this, you will divide the list of books into different groups depending on their sales.
Getting ready
You need an Excel spreadsheet file containing a list of books with the following columns:
title
id_author
price
,id_title
genre
sales
This last column represents the quantity of books sold in the last period.
You can download a sample file from the book's website.
How to do it...
Carry out the following steps:
Create a new transformation and drag an Excel Input step from the Input category.
Under the Files tab, browse to and select the
sales_books.xls
file.Complete the...