Page 1 of 2

NextSurrogateKey()

Posted: Wed Nov 07, 2007 6:59 am
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

Posted: Wed Nov 07, 2007 7:13 am
by ray.wurlod
It's available in server jobs.
Use the Surrogate Key Generator stage in parallel jobs.

Posted: Wed Nov 07, 2007 7:18 am
by chulett
It's available in server jobs... with the 8.x release? :?

Posted: Wed Nov 07, 2007 7:32 am
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

Posted: Wed Nov 07, 2007 7:34 am
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

Posted: Wed Nov 07, 2007 7:48 am
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".

Posted: Wed Nov 07, 2007 8:12 am
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.

Posted: Wed Nov 07, 2007 8:12 am
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.

Posted: Wed Nov 07, 2007 8:15 am
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.

Posted: Wed Nov 07, 2007 9:27 am
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

Posted: Wed Nov 07, 2007 9:32 am
by chulett
Have you tried... oh, I don't know... searching the forums?

Posted: Wed Nov 07, 2007 9:53 am
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.

Posted: Wed Nov 07, 2007 9:54 am
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

Posted: Wed Nov 07, 2007 11:00 am
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

Posted: Fri Nov 09, 2007 11:20 pm
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.