Can anyone think of a solution to this problem?
I have a CSV file with header in first 2 rows and they will remain constant. Only the value in the 3 row will change. I have to load this data into a table.
Input CSV file:
Prod1,,Prod2,,Prod3
Loc1,Loc2,Loc1,Loc2,Loc3,Loc4
1,2,3,4,5,6
Output:
Prod1,Loc1,1
Prod1,Loc2,2
Prod2,Loc1,3
Prod2,Loc2,4
Prod3,Loc3,5
Prod3,Loc4,6
I think loading data into a table directly will be difficult so thought of converting this data into the Output format given above. I am new to datastage so can anyone tell me how to proceed with this.
File with multiple headers
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
valar_mathi
- Participant
- Posts: 9
- Joined: Sun Oct 28, 2007 11:57 pm
File with multiple headers
Thank you for the reply.
I am also trying in the same way. I extracted the headers seperately but could not achieve the output. Can you pls explain in detail?
I am also trying in the same way. I extracted the headers seperately but could not achieve the output. Can you pls explain in detail?
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Derive the output columns directly from the stage variables, but only in the rows where the stage variables change. For example
Code: Select all
If @INROWNUM = 1 Then InLink.Col1 Else svProc1IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
valar_mathi
- Participant
- Posts: 9
- Joined: Sun Oct 28, 2007 11:57 pm
Column to Row
It works for coverting first column into row but couldnt covert the other columns.
Is it possible to achieve it in any other way?
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: