Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. My job requires me to run a job only if the employee gender is "woman", or else stop the job if it's a "man". I tried to the run the job via TJava component but it only lets me run the job via a numeric condition eg if age > 30. How do I make a context variable that of a string and how to go about this query?
Hello,
As you cannot apply a condition directly to a flow, you can have two output flows from tMap with your condition as an expression filter on the output tables in tMap or link the output flow from tMap to a tHashOutput or tFileDelimitedOutput and then have two RunIfs with your condition from your output component to a corresponding input component and then a flow on to your next step
e.g.
Input source--> tMap --flow--> tHashOutput --RunIf(context.gender.equals("Woman"))--> tHashInput --flow--> further job
--RunIf(context.gender.equals("Man"))--> tHashInput --flow--> tDie
Hope it helps.
Best regards
Sabrina
Hello,
As you cannot apply a condition directly to a flow, you can have two output flows from tMap with your condition as an expression filter on the output tables in tMap or link the output flow from tMap to a tHashOutput or tFileDelimitedOutput and then have two RunIfs with your condition from your output component to a corresponding input component and then a flow on to your next step
e.g.
Input source--> tMap --flow--> tHashOutput --RunIf(context.gender.equals("Woman"))--> tHashInput --flow--> further job
--RunIf(context.gender.equals("Man"))--> tHashInput --flow--> tDie
Hope it helps.
Best regards
Sabrina
Worked great, thankyou!