Return value from Talend Job

Six Stars

Return value from Talend Job

Hi,

 

Our requirement is when Talend job successfully complete without any error,Then Talend graph should return 1 so this number can be accepted by another script and can perform other activity.

How to achieve this requirement in Talend. Please assist.

 

Regards,

Vivek

Thirteen Stars

Re: Return value from Talend Job

@vivek_u ,if you want to return the values ,then you can use tJava component on success of the the job and print the value which wan to return.

Manohar B
Six Stars

Re: Return value from Talend Job

Hi,

 

Where to put t java component and where to find event called 'on success of the the job' Can you elaborate and show how to design that.

 

Regards,

Vivek

Six Stars

Re: Return value from Talend Job

I assume you run Talend through unix environment as exported job. 

 

When calling the talend job

./talendjob.sh

result = $?

 

or 

 

result= ./talendjob.sh

 

Now result would hold either 1 or 0 depending of the success of talendjob.sh

Six Stars

Re: Return value from Talend Job

Thanks Vignesh.

However we would like to know how to achieve this is in Talend job (related design and on which event) ?

 

Regards,

Vivek

Highlighted
Six Stars

Re: Return value from Talend Job

Hi, 

 

How are you planning to deploy and run the job in PROD? after development. 

 

That plan is needed to get information of triggering another job on this jobs success or failure

 

If you are going to trigger another TalenD job then you can have job 1 and job 2 as sub jobs in job 3. with condition tigger "on  subjob OK" linked from job 1 to job 2. use tRunJob component to create subjobs in talend. 

 

 

Seven Stars

Re: Return value from Talend Job

Are you looking for execution Plan on TAC ?

 

https://help.talend.com/reader/GL_4g5KgOuy9xQdPC2EzSQ/y0Us7J_ukdgxhe9Jx_o_NQ 

Regards
Abhishek KUMAR
( Please mark the post as resolved if you found your solution )
Six Stars

Re: Return value from Talend Job

We have only one main job where all components are designed.

Six Stars

Re: Return value from Talend Job

This is not working... subjob ok is always executing only one condition even component thrown error as well

Employee

Re: Return value from Talend Job

Hi,

 

    Did you print and verify the value which is getting returned from the job?

 

    Based on the return value, if you want to trigger another job, you can also try Run if condition.

 

     Say, run Job B if return value is 1. Run Job C if return value is 0.

 

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 :-)

 


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Six Stars

Re: Return value from Talend Job

There is only one graph with 4-5 component if any component is throwing exception then graph should return 0 otherwise 1.

Employee

Re: Return value from Talend Job

Hi Vivek,

 

     We are helpless unless you are ready to provide more information about your job flow. Could you please provide your current job flow, the input data and the expected output data and the expected return value details? Also please advise how you are planning to schedule it and what are you trying to say when you are mentioning "Talend graph"? Is it the flow of the job or are you mentioning about visual graphs?

 

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Thirteen Stars

Re: Return value from Talend Job


@vivek_u wrote:

There is only one graph with 4-5 component if any component is throwing exception then graph should return 0 otherwise 1.


Hi,

try to think different

 

by default (and always) - each program which finished successfully return 0, and bash, talend, powershell and etc can manage this values

 

if job finished without error - it automatically returns 0

if you need return any other code - use tDie with preferred code (it could be more than 1)

-----------

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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