Page 1 of 1

Datastage parallel Routines

Posted: Fri May 20, 2011 6:27 am
by major
Hi,

I have a datastage parallel Job where I need to generate keys based on the valus stored in the SDK_Sequences file using the KeyMgtGetNextValue server routine. By accessing this value I will generate keys based on the value in the file and insert the value in the table. Now i m tring to convert my job to parallel, But I am not able to figure out the parallel equivalent of the routine KeyMgtGetNextValue.

Posted: Fri May 20, 2011 6:47 am
by chulett
There's no coversion for that. If you have to use the value from the SDK hashed file, you'll need to use the BASIC Transformer or a Server Shared Container.

Are you actively sharing this key source with Server jobs? If not, why not switch to a parallel source like the Surrogate Key Generator stage?

Posted: Fri May 20, 2011 7:45 am
by major
we cannot go for surrogate key stage as we need to maitain the referntial integrity of the keys. moreover we will use these keys in other jobs so as we cannot lose the values during runtime

Posted: Fri May 20, 2011 3:56 pm
by ray.wurlod
<rant>
Resist stupid requirements!
</rant>

What's the functional difference between a state file (used by SKG stage) and a hashed file (used by SDK routine)? None!

Posted: Fri May 20, 2011 5:47 pm
by chulett
major wrote:we cannot go for surrogate key stage as we need to maitain the referntial integrity of the keys. moreover we will use these keys in other jobs so as we cannot lose the values during runtime
Sorry but I'm afraid I don't understand either sentence in this context. Does the first one refer to the question I asked? Are you saying that you have both Server and PX jobs populating this table and they need to use a common key source? For the second sentence, I have no idea what "we cannot lose the values during runtime" might be referring to. :?

Posted: Mon May 23, 2011 3:25 am
by major
chulett wrote:
major wrote:we cannot go for surrogate key stage as we need to maitain the referntial integrity of the keys. moreover we will use these keys in other jobs so as we cannot lose the values during runtime
Sorry but I'm afraid I don't understand either sentence in this context. Does the first one refer to the question I asked? Are you saying that you have both Server and PX jobs populating this table and they need to use a common key source? For the second sentence, I have no idea what "we cannot lose the values during runtime" might be referring to. :?
I need to use KeyMgtGetNextValue server routine in parallel job. I'm unable to use it parallel job. Is there any other parallel routine similar to it or how i can achieve the same functionality?

Posted: Mon May 23, 2011 5:14 am
by ray.wurlod
You would have to write your own routine that invoked the "UniVerse" C API functions for invoking hashed files.

To pre-empt your next question, there is no other way if you insist upon using SDKSequences from a parallel Transformer stage.

Posted: Mon May 23, 2011 6:29 am
by chulett
Server Shared Container.