NextSurrogateKey()

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

srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

NextSurrogateKey()

Post by srimitta »

Hi All,

I am trying to use NextSurrogateKey() in Paralell Transform stage.

I tried to find NextSurrogateKey() usage in all doc's, couldn't find.

Any one idea about NextSurrogateKey() usage.


Thanks
srimitta
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's available in server jobs.
Use the Surrogate Key Generator stage in parallel jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's available in server jobs... with the 8.x release? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Hi Ray

I also tried to use Stage but job Aborted with below warning:

Surrogate_Key_Generator_48,0: Internal Error: (start <= end): surrkey/keystate.C: 73
Traceback: Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH

When checked from command line 'gdb' and 'sed' are working fine.
our OS is Suse-Linux.

Any thought :shock:

Thanks
srimitta
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Hi Ray

I also tried to use Stage but job Aborted with below warning:

Surrogate_Key_Generator_48,0: Internal Error: (start <= end): surrkey/keystate.C: 73
Traceback: Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH

When checked from command line 'gdb' and 'sed' are working fine.
our OS is Suse-Linux.

Any thought :shock:

Thanks
srimitta
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First thought - "search forums for Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH to see if anyone else has ever posted it".
-craig

"You can never have too many knives" -- Logan Nine Fingers
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

I could find your posting.

I am running one single simple DS job with Surrogate key generator stage to read value from a flat file.
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

I could find your posting thanks.

I am running one single simple DS job with Surrogate key generator stage to read value from a flat file.
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

In version 8.x there is a new tab of the parallel transformer properties called Surrogate Key. Within this tab you define how you want to manage the surrogate key - either flat file or DB Sequence and then in the transformer derivation of the output column you simply invoke NextSurrogateKey().

If you are using a flat file then the value is persisted and if you process 100 rows during a run it will start with something greater than 100 on the next run.

It also appears that the Surrogate Key stage has been extended to include this same functionality.

I have used this and it works well.
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

I have tried using your method, GREAT, but still I have same error

APT_CombinedOperatorController,1: Internal Error: (start <= end): surrkey/keystate.C: 73
Traceback: Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH


what does check that 'gdb' and 'sed' are installed and on your PATH
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you tried... oh, I don't know... searching the forums?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

For future reference, the following message -
APT_CombinedOperatorController
can be further broken down by including the APT_DISABLE_COMBINATION. This will allow the error messages to be more specific. Many of the stages are actually combined operators and this makes diagnosis a bit easier.
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Hey Craig, I found your posting.

This is what with you are trying to help in resloving 'gdb' and 'sed'
  • If you run them separately, do they run without this error?

    Edit - nm, I see you already said they did. To me, that would imply you could have overloaded your database. There is typically a parameter that controls the number of maximum concurrent connections, perhaps you've blown that limit? A DBA should be able to help...
but I am the only one user running DS and only one simple job.

can you help me in understand what does check that 'gdb' and 'sed' are installed and on your PATH means

I know how to design DS job as per Ray's advise but client is insisting not to use any Server jobs.

Thanks
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Hi Mhester,

I don't see APT_DISABLE_COMBINATION in job log.

Ok..let me see if I can give you more info, here is the log.
  • When APT_DISABLE_COMBINATION is set to False
    -Transformer_45,1: Failure during execution of operator logic.
    -APT_CombinedOperatorController,0: Internal Error: (start <= end): surrkey/keystate.C: 73
    Traceback: Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH
    -node_node2: Player 2 terminated unexpectedly.
    -main_program: APT_PMsectionLeader(2, node2), player 2 - Unexpected exit status 1.
  • When APT_DISABLE_COMBINATION is set to True
    -Transformer_45,0: Failure during execution of operator logic.
    -Transformer_45,0: Internal Error: (start <= end): surrkey/keystate.C: 73
    Traceback: Could not obtain stack trace; check that 'gdb' and 'sed' are installed and on your PATH
    -Transformer_45,1: Failure during execution of operator logic.
    -node_node1: Player 5 terminated unexpectedly.
    -main_program: APT_PMsectionLeader(1, node1), player 5 - Unexpected exit status 1.
srimitta
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Are you trying to use NextSurrogateKey() in a Stage Variable?

If so, I don't believe that you can. You can only use it in an output link column derivation.
Ross Leishman
Post Reply