• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to group list of row into java list object an inverse ?

#1 2008-01-28 14:29:19

richiesgr
Member
Registered: 2008-01-23
Posts: 25

How to group list of row into java list object an inverse ?

Tags: [api, code, java]

Hi

I'm using Talend to manage flow that call Java api. I use TjavaFlex and write java routine to wrap the java api all is fine.

My problem I've an api that receive a List<String> as parameter and return back a String array.
like  String[] call(List<String> data)

In my flow I get the data from 1 column and I need to build a bulk of 5000 string put this into a list an call the API, the API return back String[] this string array need to continue the flow. Of course I need to make this for each 5000 rows.

I've tried to play with Tbuffer but I don't understand how to change 5000 row to a list

I don't know also how to reenter into the flow the string array that I get back from the API

Please help

Offline

#2 2008-01-30 09:44:17

richiesgr
Member
Registered: 2008-01-23
Posts: 25

Re: How to group list of row into java list object an inverse ?

Hello Nobody have an idea ??
Is there anybody have ever use a list type field ??

Thanks

Offline

#3 2008-01-30 10:58:25

amaumont
Talend team
Registered: 2006-09-20
Posts: 471

Re: How to group list of row into java list object an inverse ?

I hope I understood your request and I built this job, see the screenshots.


Uploaded Images

Offline

#4 2008-01-30 13:59:12

richiesgr
Member
Registered: 2008-01-23
Posts: 25

Re: How to group list of row into java list object an inverse ?

Thanks for your response it's ok for the second part of the problem meaning To get an array back from the API and loop on it
many thanks for this.

But the first part is more complicated :
I need to build a List java object with data from Tmap meaning that Tmap need to output the data to TjavaFlex but it going to make it for each row I need to take these rows data and add them into a list WHEN the list size = 5000 I need to call my java API and pass this list as parameter

If you need more detailled description tell me what could help you

Thanks

Offline

#5 2008-01-30 17:07:40

amaumont
Talend team
Registered: 2006-09-20
Posts: 471

Re: How to group list of row into java list object an inverse ?

I think the new job should response to your need.


Uploaded Images

Last edited by amaumont (2008-01-30 17:15:45)

Offline

#6 2008-01-30 20:31:38

richiesgr
Member
Registered: 2008-01-23
Posts: 25

Re: How to group list of row into java list object an inverse ?

I got It !!!!

Thank you very much

Offline

#7 2010-01-28 20:43:10

agustin
Guest

Re: How to group list of row into java list object an inverse ?

amaumont wrote:

I hope I understood your request and I built this job, see the screenshots.

can you explain me how do you do that...please...

because i get lost... in the part where you getGloba...

tks...

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to group list of row into java list object an inverse ?

Board footer

Powered by FluxBB