Hi,
I am junior developer and have problem.I have source data like above.Credit_id is increasing automatically
credit_id proposal_id
1 1
2 1
3 1
4 2
5 2
and i want to put this data to target like this
credit_id proposal_id credit_index
1 1 1
2 1 2
3 1 3
4 2 1
5 2 2
how can i do?
thanks for your helps
adding sub sequence using stages
Moderators: chulett, rschirm, roy
Hi Welcome aboard!!! :D
You can simply use sort stage and sort based on Proposal_id and include a column to detect the change in Key column option to have the serial number to be generated. Optionally you can use transformer to detect the change in previous row to the current row.
You can simply use sort stage and sort based on Proposal_id and include a column to detect the change in Key column option to have the serial number to be generated. Optionally you can use transformer to detect the change in previous row to the current row.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Sort stage can generate two extra columns (key change and cluster key change). You need the first of these. Pass it into your Transformer stage and use it to reset your counter (a stage variable, probably) to 1 when the key value changes.
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.