key change column with sort stage

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

Post Reply
rakesh.puli
Premium Member
Premium Member
Posts: 29
Joined: Wed Mar 22, 2017 10:45 pm

key change column with sort stage

Post by rakesh.puli »

Hi

I have designed a job to remove duplicates using the key change column in sort stage. I have written the records with the key change value=1 into target1 file with constraint "keychange value =1" in transformer and other records key change column value=0 with constraint in transformer with "keychange value=0" into other target file.

designed job as below

Code: Select all

seqfile --sort stage--copystage--transformer 1  ---target 1
                               --transformer 2 ---target 2
but can I remove the copy stage and use only one transformer rather than using two transformers as above and write any condition in transformer and then output to two target files?

Please let me know. I am not able to find attachments option in this message otherwise i would have shown the job design in this message

Thanks
Rakesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

[code] tags help. And... sure.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rakesh.puli
Premium Member
Premium Member
Posts: 29
Joined: Wed Mar 22, 2017 10:45 pm

Post by rakesh.puli »

What is the logic we have to apply to avoid using two transformers and copy stage? To use only one transformer and output to two targets and job design should look like this.

Code: Select all

seqfile -> sort ->  transformer -> target1
                                -> target2
Thanks
rakesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I meant you wrap your 'job diagram' in code tags (buttons above the text box) not just the word itself. Use 'Preview' until you get it spaced right and then it will look like what I did to your first post.

Anyway, we don't know exactly what you are doing but it should be as simple as linking both targets to the transformer (example) and then putting an appropriate constraint in each so that the proper things go to the proper target.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply