Twisting the data
Posted: Fri Oct 09, 2009 7:08 pm
I'm not sure what the terminology is for this situation, so I'm not sure how to search for a solution.
I've got a data file where a record looks like this:
09/09/2009|Tracy|Red|Green|Blue|Orange
I want to insert that into my database as 4 records like this:
09/09/2009 Tracy Red
09/09/2009 Tracy Green
09/09/2009 Tracy Blue
09/09/2009 Tracy Orange
In order to do this, I was going to process the file 4 times, pulling out each color individually. Then I'd do 4 loads.
Not a big deal when there's only 4. But my file actually has 30 and I didn't want to have such repetition.
I was hoping to be able to create a simple job and then create a loop to run it 30 times using a variable to pull different fields (for instance, use COLOR_X in my Router where I would substitute X with the Loop Number).
I couldn't get this to work. Is this possible. Or is there another method that I can look into?
I've got a data file where a record looks like this:
09/09/2009|Tracy|Red|Green|Blue|Orange
I want to insert that into my database as 4 records like this:
09/09/2009 Tracy Red
09/09/2009 Tracy Green
09/09/2009 Tracy Blue
09/09/2009 Tracy Orange
In order to do this, I was going to process the file 4 times, pulling out each color individually. Then I'd do 4 loads.
Not a big deal when there's only 4. But my file actually has 30 and I didn't want to have such repetition.
I was hoping to be able to create a simple job and then create a loop to run it 30 times using a variable to pull different fields (for instance, use COLOR_X in my Router where I would substitute X with the Loop Number).
I couldn't get this to work. Is this possible. Or is there another method that I can look into?