Page 1 of 1

TRansformer

Posted: Thu Feb 25, 2010 6:27 pm
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.

Posted: Thu Feb 25, 2010 8:04 pm
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.

Posted: Thu Feb 25, 2010 9:47 pm
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.

Posted: Thu Feb 25, 2010 9:51 pm
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" '

Posted: Thu Feb 25, 2010 10:20 pm
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?