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?
Twisting the data
Moderators: chulett, rschirm, roy
Re: Twisting the data
I see the Job Type is Server, but posting is in the Parallel Extender forum.
For your specific problem , you can use the Pivot Stage(Server), That should take care of the problem you describe.
Documentation on Pivot stage (server) is supplied in the Plug In Guides section.. Alternatively a search query on 'Pivot' or 'Horizontal Pivot'
Regards
Ramesh
For your specific problem , you can use the Pivot Stage(Server), That should take care of the problem you describe.
Documentation on Pivot stage (server) is supplied in the Plug In Guides section.. Alternatively a search query on 'Pivot' or 'Horizontal Pivot'
Regards
Ramesh
-
- Premium Member
- Posts: 50
- Joined: Sat Jan 31, 2009 3:39 am
- Location: Riyadh
- Contact:
Hi Tracy;
you can try this, use the field function and stage variable like this:
1. stage variable value eg StgV = [repeated part]
eReplace( Field(YourCol,'|',1,2),'|',' ') = (09/09/2009 Tracy)
2. First column = StgV:' ':Field(YourCol,'|',3,1)
3. Second column = StgV:' ':Field(YourCol,'|',4,1)
.
.
.
.
.
30. Thirty column = StgV:' ':Field(YourCol,'|',33,1)
Hope this help
you can try this, use the field function and stage variable like this:
1. stage variable value eg StgV = [repeated part]
eReplace( Field(YourCol,'|',1,2),'|',' ') = (09/09/2009 Tracy)
2. First column = StgV:' ':Field(YourCol,'|',3,1)
3. Second column = StgV:' ':Field(YourCol,'|',4,1)
.
.
.
.
.
30. Thirty column = StgV:' ':Field(YourCol,'|',33,1)
Hope this help
-
- Premium Member
- Posts: 50
- Joined: Sat Jan 31, 2009 3:39 am
- Location: Riyadh
- Contact: