Page 1 of 1

key change column with sort stage

Posted: Thu Feb 06, 2020 2:51 am
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

Posted: Thu Feb 06, 2020 4:14 am
by chulett
[code] tags help. And... sure.

Posted: Fri Feb 07, 2020 7:26 pm
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

Posted: Sat Feb 08, 2020 5:16 am
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.