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
mcs_suman
Participant
Posts: 20
Joined: Thu Sep 27, 2007 8:42 am
Location: chennai
Contact:

TRansformer

Post by mcs_suman »

Hi guys,

I have a file with records A
B
C

I want to pass this to three outputs seperately from transformer as output1=A,output2=B and output3=C without passing constraints or using any conditions. one output can have constraints, is it possible to do with functions in transformer.
suman
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

not sure if it can be done in Parallel.
but in a server job, using link partition(hash partition on that column) will do.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As asked - I want to pass this to three outputs seperately from transformer without constraints - this must be done with constraints. They are the only thing stopping rows from going down all output links, Server or Parallel.
-craig

"You can never have too many knives" -- Logan Nine Fingers
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

If you are writing to three files, then have constraint in one of outgoing links and add filter on other two target sequential files to send particular value to that file
awk ' $0 ~ "B" '

awk ' $0 ~ "C" '
You are the creator of your destiny - Swami Vivekananda
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Three unconstrained outputs from the Transformer stage will get A out one link, B out one link and C out one link. Trouble is, all rows will go out all links - that's what "no constraints" means.

You could use one output link and a downstream Switch stage. But what's the aversion to using constraints?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply