Hi There,
Scenario
My records look like
AccountNo. BillNo. Item_id
1 1 167
1 1 168
1 2 6
1 2 7
1 2 8
2 1 6
Now, I need to record log for record count
By account, Bill, RecordCount
so it will be
Accountno Billno RecordCount
1 1 2
1 2 3
2 1 1
I searched thru the DSX, there were articles about
KeyMgtGetNextValue
SDKSequences
RowProcGetPreviousValue
Please advice
1. Are these datastage defined functions
2. If yes, how to use them (I tried to use them but I get error saying define variable)
3. If No, How to do this.
Thanks and regards,
Munish
Counter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
You are posting in the parallel forum, if you are using parallel jobs you will need to go to the FAQ forum for the entry on creating a parallel counter within a Transformer. The routines you listed cannot be used in parallel jobs.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
What is the source of this data?
If it is a table, you can achieve your results by writing a simple query.
If a file, you can write it to a table and do the same.
Of course there are can be other options too.
If it is a table, you can achieve your results by writing a simple query.
Code: Select all
select AccountNo, BillNo, count (Item_id) RecordCount
from TABLE
group by AccountNo, BillNo
Of course there are can be other options too.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
You did not answer Vincent's questions, your answers will be based on it.vmcburney wrote:You are posting in the parallel forum, if you are using parallel jobs you will need to go to the FAQ forum for the entry on creating a parallel counter within a Transformer. The routines you listed cannot be used in parallel jobs.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
Click here to go to the post that vincent is talking about. If you can partition your data on the group (AccountNo+BillNo) then you can get a counter set up by using two stage variables. Read that post, it will get your work done.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.