Input record sequence number

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ask yourself whether uniqueness is sufficient. If it is, gaps in the numbers are completely irrelevant.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

anbu wrote:Run the parallel transformer in sequential way and use @INROWNUM
This is the current scenario Anbu. But the jobs run for a longer time. Say the job with sequential mode runs nearly an hour and making it parallel, it runs less than 10 minutes.
Arun
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

ray.wurlod wrote:Ask yourself whether uniqueness is sufficient. If it is, gaps in the numbers are completely irrelevant. ...
No Ray. I want the Input records sequence number. The requirement is, we have an error processing and which ever record errors, I need to cature the Input record sequence number and store it in a table for further investigation/reporting.

And If I have only 175 records in today's file and say the last record errors. I cannot say them the record sequence number is 177, which will give no meaning to them.
Arun
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

arunkumarmm wrote:
anbu wrote:Run the parallel transformer in sequential way and use @INROWNUM
This is the current scenario Anbu. But the jobs run for a longer time. Say the job with sequential mode runs nearly an hour and making it parallel, it runs less than 10 minutes.
Or finish your processing in one job without sequence number if it is ok for your requirement. In second job create seqeunce number using transformer running in sequential way
You are the creator of your destiny - Swami Vivekananda
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

anbu wrote:Or finish your processing in one job without sequence number if it is ok for your requirement. In second job create seqeunce number using transformer running in sequential way
I need to map this sequence number to the records which is errored out.
Arun
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The only way to guarantee unbroken sequence is to run the stage that generates them - I'd use a Column Generator stage - in sequential mode.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SBSA_DW2
Premium Member
Premium Member
Posts: 37
Joined: Fri Jul 25, 2008 1:24 am

sequence number

Post by SBSA_DW2 »

recieved this code, hope it helps:

Code: Select all

(1 + @INROWNUM + MOD(@PARTITIONNUM, @NUMPARTITIONS)) + ((@INROWNUM -1) * (@NUMPARTITIONS -1))
Post Reply