Getting "executable" value for a flow running in Talend Cloud from inside the job

Four Stars

Getting "executable" value for a flow running in Talend Cloud from inside the job

In order to automatically restart a job that might have failed for a transient reason (network timeout for instance or 404 for some resource) then I can use the Talend Cloud API (https://ipaas.eu.cloud.talend.com/api/swagger/swagger-ui.html#!/executions/execute) to re-run the flow that failed (after catching the error and logging it, etc.). However, I need to know the "executable" value for the flow in question, as the error is being caught inside the running job, it will also have to be inside the job that I call the TIC API to re-run it, so is there a way, variable, etc. to get the "executable" value for the currently running job inside the job itself?

 

I could conceivably do a GET on https://ipaas.eu.cloud.talend.com/api/swagger/swagger-ui.html#!/executions/getExecutionStatus, however, this requires the "execution-id" is there a way to get this from inside the job (bearing in mind there may be multiple jobs running at once)?

Community Manager

Re: Getting "executable" value for a flow running in Talend Cloud from inside the job

A slightly different way of approaching this, but it might give you an idea.

 

Could you start all your jobs using the API (https://ipaas.eu.integrationcloud.talend.com/api/v1/executions). If you can do that, then whenever you start a job this way, the execution Id is returned to you. Then you could poll the active job(s) using the execution Id(s) you have noted using the getExecutionStatus call. All this would take would be a job run periodically (I've used a Talend Route when trying this out in the past) and a database table that can keep a log of running execution Ids.

 

If I have understood your requirement correctly, I think this might be a reasonable solution.

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

Modern Data Engineering in the Cloud

Learn about modern data engineering in the Cloud

Watch Now

How to deploy Talend Jobs as Docker images to Amazon, Azure and Google Cloud reg...

Learn how to deploy Talend Jobs as Docker images to Amazon, Azure and Google Cloud registries

Blog

Talend API Services Publish to Talend Cloud

Learn how to publish your API Services to Talend Cloud

Watch Now