Five Stars

Custom component: get current row

Hello,

 

I am development a custom component for Talend Open Studio. The custom component can have more then one incoming flow. I reveive the incoming Connections with node.getIncomingConnections(EConnectionType.FLOW_MAIN); Thats works.

But If a create a job, I got an error:

row1/row2 not exist. I see in my example (two rowGenerators connect to my custom component) there are two methods:

 

tRowGenerator_1Process/tRowGenerator_2Process. The two method contains my code from the custom component. Thats ok, but because I produce code for all over incoming rows, he also produce code for row2 in tRowGenerator_1Process method and row1 in tRowGenerator_2Process. In method 

tRowGenerator_1Process he not found row2 and in  tRowGenerator_2Process he not found row1.

Can I see what is the current component or method  with his rows? Then can I filter this rows and produce only code for the right method.

 

I only use the _main.javajet

 

Greets

 

Benjamin

 

  • Data Integration
  • ESB
1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: Custom component: get current row

ok I have found the solution by my self: over codeGenArgument.getIncomingName() you can get the current row.
2 REPLIES
Five Stars

Re: Custom component: get current row

ok I have found the solution by my self: over codeGenArgument.getIncomingName() you can get the current row.
Moderator

Re: Custom component: get current row

Hi,

Great that you have found the solution by yourself. Please mark your topic as resolved.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.