Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] tJavaFlex - multiple rows

I needing return many rows from a tJavaFlex.
There are 2 components in the job: tJavaFlex and tLogRow.
There are 2 colunms in the schema: COD and DESC.

In the tJavaFlex:
Start code: connect to a data base, execute the SQL.
Main code: loop with the result.
row1.COD = return.col1;
row1.DESC = return.col1;
End code: disconnect to a data base

The connection and SQL execute are working very well, but the return of tJavaFlex is just one row (the last row). The result of SQL has many row.
How can I return many rows fom the tJavaFlex?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

You have to switch the opening loop with the result to begin part
And don't forget to close your loop in end part.

View solution in original post

5 Replies
Anonymous
Not applicable

You have to switch the opening loop with the result to begin part
And don't forget to close your loop in end part.
_AnonymousUser
Specialist III
Specialist III
Author

That it is!
Thank you very much!
_AnonymousUser
Specialist III
Specialist III
Author

There are 2 components in the job: tJavaFlex and tLogRow.
There are 2 colunms in the schema: COD and DESC.

In the tJavaFlex:
Start code: connect to a data base, execute the SQL.
Main code: loop with the result.
row1.COD = return.col1;
row1.DESC = return.col1;
End code: disconnect to a data base

I do not know how to connect to an oracle database from tjavaflex.Can you help me?
_AnonymousUser
Specialist III
Specialist III
Author

Thank you mhirt.
Your solution helped t oresolve my probelm 0683p000009MACn.png
Anonymous
Not applicable

Why Error Message Talend Tjava not have function. I can't know what error it appeared. please help me