Custom component: get current row

Seven 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

 


Accepted Solutions
Highlighted
Seven 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.

All Replies
Highlighted
Seven 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.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now