[resolved] tJavaFlex - multiple rows

One Star

[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?

Accepted Solutions
Employee

Re: [resolved] tJavaFlex - multiple rows

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

All Replies
Employee

Re: [resolved] tJavaFlex - multiple rows

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

Re: [resolved] tJavaFlex - multiple rows

That it is!
Thank you very much!
One Star

Re: [resolved] tJavaFlex - multiple rows

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?
One Star

Re: [resolved] tJavaFlex - multiple rows

Thank you mhirt.
Your solution helped t oresolve my probelmSmiley Happy
One Star

Re: [resolved] tJavaFlex - multiple rows

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch