Hi
I have migrated a server job from Datastage 7.5 version to 8.5 version which uses KeyMgtGetNextValue for generating key sequence values. I noticed that there were some missing key values (there was a jump in sequence) when used in 8.5 which did not happen in 7.5.
Any idea why this can happen?
Thanks,
Preeti
Missing key values when using KeyMgtGetNextValue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I have done more testing and found this.
Below is the job design:
Source file --- > Transformer(Has a reference from hash and writes the sequence generated to the hash if the natural key from source value does not exist) and another output link to output file. The sequence generation logic is written in both the output links(first to hash file and then to output file).
The sequence derivation is like this: If isNull(Sequence) then KeyMgtGetNextValue('A',Natural key) else Sequence
It works fine for all the values except when the natural key value is empty. In this case the sequence generated for writing to hash file is different from the one written to output file and there we got a jump.
The same design worked fine on 7.5 version, however, getting this issue in 8.5 version.
As a fix for now, we have calculated the value in stage variable and assigned them on both output links. However, still not sure how it worked in 7.5 and not in 8.5 version
Below is the job design:
Source file --- > Transformer(Has a reference from hash and writes the sequence generated to the hash if the natural key from source value does not exist) and another output link to output file. The sequence generation logic is written in both the output links(first to hash file and then to output file).
The sequence derivation is like this: If isNull(Sequence) then KeyMgtGetNextValue('A',Natural key) else Sequence
It works fine for all the values except when the natural key value is empty. In this case the sequence generated for writing to hash file is different from the one written to output file and there we got a jump.
The same design worked fine on 7.5 version, however, getting this issue in 8.5 version.
As a fix for now, we have calculated the value in stage variable and assigned them on both output links. However, still not sure how it worked in 7.5 and not in 8.5 version