Design Component name

Highlighted
Eight Stars

Design Component name

I have a few tJava components added. They are added with name tJava_1... tJava_n

 

I have renamed and given them a custom name so its easy for me debug.

 

I know there is a "currentComponent" variable which allows me to reference this object. Is there anything available which would allow me to reference the custom name of that component? 

 

Thanks.

Eight Stars

Re: Design Component name

You can access the "custom name" or label, of any component like:

 

(String)globalMap.get("componentName__LABEL__");
// e.g., for tJava_1:
(String)globalMap.get("tJava_1__LABEL__");

I am not sure what you mean by the "current" component.  If you mean the component that is being executed currently in the flow, I am not sure how you would get that.

 

--
Please give Kudos and mark topics as solved where appropriate.
Eight Stars

Re: Design Component name

@nfz11 Unfortunately, this did not work for me. Do you have any working example you can share? Maybe I am missing something. 

 

Thanks!

Eight Stars

Re: Design Component name

I apologize, the example I gave will not work as the __LABEL__ value is not exported to the globalMap.  I don't think there is a way to get that value in a Talend job.

--
Please give Kudos and mark topics as solved where appropriate.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads