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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

instance row1 inside tjavaflex (Urgent)

I am connecting a tjavaFlex to a tPostgreSQLOutput using a row main connection. I need to assign the values of the attributes of row1(instance of rowStruct) that will be inserted in the database in a class(routine) other than TjavaFlex. In other words, the same instance of rowStruct declared inside the tjavaflex is used in another routine , where the values of the attributes are filled and then the tjavaflex process resumes by inserting the values in the database. My problem is that when I use row1 in another routine it is no longer recognized, because it is a local variable inside a tjavaflex and because the routines package is different from the project package. How can I declare row1 so that it is recognized by the routine
Labels (3)
25 Replies
Anonymous
Not applicable

Hi,
I am new to TOS.
Could you pls tell me some code snippets showing how and when to use tJavaRow and tJavaRow?
I didnt get much documentation about these two components on net...
Many thanks.
-Sonal
Anonymous
Not applicable

Hi sonal,
I think you will find many if yor use the forum search function.
In most cases you will use a tJavaRow if you have to do complex operations which will not supported by standard components. This could be something completely new or a more simple step which you wouldn't like to add into an existing component (for example a transformation).
To use tJavaRow, just add it in your flow. You can use input_row to address the input flow and output_row for the output. You must map all variables. If not they will have a null value at the end.
If you have any special problem to solve, please post an example (it's much easier to work with that).
Bye
Volker
And please create a new topic if you have a new question.
Anonymous
Not applicable

Hi Experts,
Im a novice to TOS. Could you please tell me where is the link to post a new topic? I didnt get the link in the forum.
Also, please tell me the use of tJavaFlex component. And, a sample code snippet would be a great help.
Thanks in advance!
-Sonal.
Anonymous
Not applicable

Please tell me what is the use of global context?
Anonymous
Not applicable

What is the difference between tJavaRow and tJavaFlex?
Also, according to my understanding, tJava can do all the tasks done by tJavaRow and tJavaFlex... so what are the advantages of tJavaRow and tJavaFlex?
Please help me.
Thanks.
-Sonal
Anonymous
Not applicable

Hello Sonal
I show you a simple code to explain the difference bettwen them. See my screenshots.
Best regards
shong
Anonymous
Not applicable

Hi,
I have never took time to use these components.
I can see a difference between the "tJava" components and the others : "tJava" permits to "insert" some code in our jobs in order to perform some Java methods.
This is not a component to perform treatment on our data flow, contrary to "tJavaFlex" and "tJavaRow" in which we can define some schemas in order to do some operations on our data.
However, I can't see much difference between these last two components.
"tJavaFlex" only adds the possibility to perform some Java code before and after our operations on the data flow, but its behaviour on the data flow is exactly the same as the behaviour of "tJavaRow". Am I right ?
Best regards,

Nicolas
Anonymous
Not applicable

thanks a lot experts 0683p000009MACn.png
Anonymous
Not applicable

Hello
"tJavaFlex" only adds the possibility to perform some Java code before and after our operations on the data flow, but its behaviour on the data flow is exactly the same as the behaviour of "tJavaRow". Am I right ?

Yes, you are right. Another difference is that you can do some processing on the coming flows on tJavaRow. eg:
output_row.id=input_row.id*2
Best regards
shong
Anonymous
Not applicable

Hi Shong and Sonal,
So, if I sum up :
- With tJava : You can execute some Java code independently of the data flow.
- With tJavaFlex : It has to be inserted in a data flow. You can perform Java code before and after the data flow. You can also perform some Java code for each row, but you cannot do some processing on the incoming data.
- With tJavaRow : It has to be inserted in a data flow too. You can do some processing on the incoming flow (operations, complex mapping).
Regards,

Nicolas