calling a component from java code inside a tJava component

One Star

calling a component from java code inside a tJava component

Hi Team,
            I have a use case where i am planning to call a talend component from a java code inside a tJava component. I have searched online to know how this could be done, but wasn't able to get anything concrete.
            Can anyone help me with this?
            Please let me know on any update needed.

Thank You
Community Manager

Re: calling a component from java code inside a tJava component

Can you tell us what you are trying to achieve? This is a very strange request without knowing what you are trying to do. I cannot think of a single reason why this would benefit you at all.
However, you can look at the auto generated code that Talend produces. Maybe you can extrapolate from that.
Highlighted
One Star

Re: calling a component from java code inside a tJava component

Hi ,
    I have a custom java code snippet where i would like to call a component in talend within the java code.I hope this helps.
Also,as you suggested ,let me check to mend the code that Talend generates to include my custom code in it.

Thank You
Four Stars

Re: calling a component from java code inside a tJava component

I have a query like below

 

There is a joblet which stores tlogCatcher and tStatCatcher statistics into Mysql database on any Die on error or Java Exception in the job 

 

I have another child job which takes care of sending mail in case of any failure in the job ( In this job_failureNotification  job , i am doing calling AWS SES API sending raw mail with html header , body , footer - Error log i am retrieving from Mysql database based on some condition )

 

I have 14 jobs which runs sequentially one after other .I need to send notification on Job failure only . So i have tPostJob component in each and every job which takes care of calling job_failureNotification . I should call the failureNotification job if and only if tLogCatcher_1.type='tDie' or 'tJavaException' 

 

Is there any way of calling using If condition of globalMap.get(tLogCatcher_1.type) in tPostJob Flow 

Employee

Re: calling a component from java code inside a tJava component

@sankar 

 

I have already answered your query in another post and the link for it is as below.

 

https://community.talend.com/t5/Design-and-Development/globalMap-get-tLogCatcher-1-type-in-tPostJob-...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

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 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog