Replace Transformer

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
vibwipro
Participant
Posts: 40
Joined: Thu Jan 24, 2013 7:34 am

Replace Transformer

Post by vibwipro »

Hi All,

I have a Job where 70 Transformers is being used. These many transformers are degrading my job performance.
I wanted to replace these transformers with some other stage.

Function of Transformer :- Transformation logic which is implemented over transformer are :-

1) To Field 1: Assign a hard coding 4 digit number like (2345, 7865, 3245) so on.
2) To Filed 2: Generate a Sequential Unique number for each record. Currently it is done through '@INROWNUM'.

Please suggests your ideas to implement same logic.

Thanks.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Perhaps you should explain what you're trying to accomplish in your job design.

I have no idea what you could possibly be doing with 70 transformer stages.

You do understand that a transformer stage works at the record level. You can transform 70 fields in 1 transformer stage (i.e. you don't need 70 transformer stages for 70 fields).

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

Post by chulett »

:shock:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vibwipro
Participant
Posts: 40
Joined: Thu Jan 24, 2013 7:34 am

Post by vibwipro »

Hi Mike,

This job is creating XML target file, hence we have to use so many transformers to generate only 2 transformation logic :-

1) To Field 1: Assign a hard coding 4 digit number like (2345, 7865, 3245) so on.
2) To Filed 2: Generate a Sequential Unique number for each record. Currently it is done through '@INROWNUM'.

Apart from these 2 logic mentioned above we are not doing any anther transformation rest all fields are straight copied to output link of transformer.

My Requirement is to replace these many transformers with some other stage to improve performance of my job.

Thanks.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Have you tried removed the 69 Transformer stages that are doing nothing?
Choose a job you love, and you will never have to work a day in your life. - Confucius
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

:shock:

You can also have 70 links coming out of a single transformer if you need to implement 70 different type of hard coding and to be sent to 70 different XML files.

I can't think of a scenario for these simple transformation which you cannot do in a single transformer. You may have to use nested if else or 70 links coming out of a single transformer or use the new XML stage.

Have a look at each stage thoroughly and then make a plan to redesign the job, if you can.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

vibwipro wrote:My Requirement is to replace these many transformers with some other stage to improve performance of my job.
That isn't the source to target mapping requirement that your job needs to satisfy.

You're so far out in the weeds, I'm not sure how to bring you back in.

Nothing you've mentioned so far suggests the need for more than one transformer...

You mention that your target is an XML file. Are you using the XML Output stage or the newer XML stage?

What are your sources?

Do you have an XSD that describes your target XML document? Or do you have a sample of the XML document that you need to produce?

Mike
Post Reply