Hello all,
I have an requirement where an csv file data should be read such that initial few columns will be fixed and the rest of the columns might be added or removed and any column data may contain comma(,) into it.
So i need to get the following:
1. Fixed columns in one link and
2. The columns which might be added or removed into other link with different delimiter retaining the comma in any of the column values.
For Ex:
column in file is Id,N,N1,N2,N3
col 'Id' and 'N' will be fixed and col 'N1','N2' can be 'N1' or 'N1','N2','N3'...
Input data:
Source col- Id,N,N1,N2
source val- 1,a,"b,d",c
Required Target data to be as
first link Data - Id,N
1,a
other link data - NewCol
b,d/c
In the above expression delimiter comma(,) is replaced by / but comma(,) inside the b,d is retained because it is a single column value.
Please get my any solution for the above stated problem.
To read all data from an CSV file and then populate into xml
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This is easily handled using a server Sequential File stage, which has (among other things) a "Missing Column" rule for each column.
You can use this stage in a parallel job be encasing it in a server Shared Container.
You can use this stage in a parallel job be encasing it in a server Shared Container.
IBM 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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That's just not going to happen. Premium content is the mechanism by which DSXchange is funded. Were it not for the premium content fees, DSXchange could not exist.ujala wrote:It would be of great help to me if you could uncheck the premium content.
Premium membership is not expensive - less than 30c (Rs12 approx) per day. And well worth the investment.
So use a server Shared Container in the parallel job as I advised.ujala wrote:...we are informed not to use any server jobs.
And resist stupid requirements.
IBM 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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: