Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tjavarow run if

hi all
i want to do connection between tjavarow to tjavarow only if something is happend how can i do it?
i try to use run if but i can't to connect him to the second tjavarow.. 
in the talend we have something that can help?

Labels (2)
12 Replies
Anonymous
Not applicable
Author

You need to better explain what you are trying to do.
"if something happend"?
It is unlikely that you're going to be connecting two tJavarow components with an "if".
Anonymous
Not applicable
Author

ok i try to explain better.

i want to use tjavarow, in the first javarow do same java code, after that to chack if the variable a1 for example is equals to "1" go to the second javarow, else if a1 is equals to "2" go to the other javarow 
Anonymous
Not applicable
Author

It sounds like you're trying to filter your output?
If you're simply looking at input data to determine which way it should go, you could use a tMap with multiple outputs.
tMap has an expression filter on the output.
tMap_1 set expression filter for output1 to "1".equals(row1.a1)
          set expression filter for output2 to "2".equals(row1.a1)

If you're new to Talend, tJavaRow is not the first component of choice. There are usually better components.
Anonymous
Not applicable
Author

i am using map with filtter and it works,  i need to do the section (you can see in the picture attachted) where it says: "Will happen in any case". 
1- first, i need to know how to implement from "JAVA ROW" to execute 2 "IF" statements. (see attached file).
2- after that step, i need to take action in any case, meaning, no matter which "IF" statement happened, the next step should ALWAYS run.
Thanks in advence.
0683p000009MGhd.jpg
Anonymous
Not applicable
Author

What happens in "action"?
Maybe a tFlowToIterate followed by tJava gives you what you need?
Anonymous
Not applicable
Author

in the action i just comput variables.
and i don't think that tjava will help me i need to use tjavaRow 
Anonymous
Not applicable
Author

Sorry, I don't think I can help.
I think the answer to your original question was to split the data using tMap which you are doing anyway.
I do not know what "comput variable" means and then what you want to do after.
the two evaluations coming from your tJavaRow_1 are exactly what you'd do in tMap to split outputs.
Anonymous
Not applicable
Author

ok Thanks  on your help. 
Anonymous
Not applicable
Author

Why not do all the code in the first tJavaRow?