Filter option vs 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
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Filter option vs Transformer

Post by pandeesh »

There are certain scenarios, i provided 2 approaches for a scenario.
Consider the below scenario:
My input record is :

Code: Select all


abc|b c d|c d e

output is:

Code: Select all


abc|bcd|c d e

My requirement is i need to eliminate the spaces in the second field.
Third field should be remained the same.

Approach1:

Achieving in Filter option in sequential file stage

Approach2:

Using Convert() in transformer.

For me both methods seem fairly equal.

Is there any benefits in any of those methods?

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

Post by chulett »

I prefer the option that is more visible and maintainable and for me that would be your #2... unless there is a serious performance impact for that choice.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

i don't see any impact in performance wise.

I agree that #2 is more tacit when compared to #1.

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

Post by chulett »

My performance impact statement was generic, not specifically about this particular case.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Ok Craig!
Thanks ! Resolving this topic!!
pandeeswaran
Post Reply