handel DBSequence with surrogate Key in transformer

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

handel DBSequence with surrogate Key in transformer

Post by yollsonlegrand »

Hello,

I want to populate a table with help for Surrogate Key in aTransformer. I'm not comming right to deal with the DBSequence I'v allready configured in the tab surrogate Key of the Transformer.How to call This in the corresponding Fiedl the Table and insert the value in the corresponding FIELD for each row? My configuration:
Data_set File --->Transformer ---->Table
Thanks in advance for your Help.
Yollson Empereur
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to derive this using the "NextSurrogateKey" function.
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Post by yollsonlegrand »

ArndW wrote:You need to derive this using the "NextSurrogateKey" function. ...
Do you mean after seeting the DBsequence in the Transformer stage I' ve to set the FIELD(CLIENT_TK) with the Derivation "NextSurrogateKey" in Double Quote?
Other like this NextSurrogateKey()?
I set like you say with double Quote.. According to the job runing, It was 22 Rows insert int the tabe without warning. But when I look into the table, I only see one row with a Keynumber 0. The KeyNumber is the value of the NextSurrogateKey value for the one Rows that is to see instead of the 22 Rows.
I don't understand Why.
Has any one an idea? Please tell me what I'm doing wrong.
Yollson Empereur
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Please read the documentation on "NextSurrogateKey" - it is not a constant, but a function that you can select from the function list in Transform stage derivations. Parallel Job Developers Guide, Chapter 11, page 183.
Post Reply