Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
FrancoisP_CH
Contributor
Contributor

Retrieve task executionId in the Studio

Hello,

I used to know how to retrieve the taskExecutionId ( the one from the TMC ) inside the job currently running, but I can't put my hands on the page with the information anymore.

Did someone have the link to documentation page ? Or simply know which syntax to use ?

And the complete list of variables we can retrieve from the TMC execution ?

Labels (2)
1 Solution

Accepted Solutions
Denis_Segard
Support
Support

Hello,

You can get the "Run Id" in a tJava using a code like :

log.warn(System.getProperty("audit.observability.metrics.context.task_execution_id"));

Kind regards
Denis

View solution in original post

4 Replies
Denis_Segard
Support
Support

Hello,

You can get the "Run Id" in a tJava using a code like :

log.warn(System.getProperty("audit.observability.metrics.context.task_execution_id"));

Kind regards
Denis

Dave_Simo
Creator II
Creator II

Hello @FrancoisP_CH 

Below is the link to the official TMC API documentation.

https://talend.qlik.dev/apis/processing/2021-03/#operation_get-tasks-executions

Best Regards

FrancoisP_CH
Contributor
Contributor
Author

Thanks, the following information seems to be retrievable this way : 

  • task_execution_id
  • workspace_id
  • task_id
  • remote_engine_name
  • remote_engine_id

For the others infos, we can use the TMC API as mention by Dave, but the need was to get this without using API call.

NL_George
Contributor II
Contributor II

I've been looking for this same thing too and the response Denis_Segard provided made me wonder which other properties we have that might be usefull.

In a tJava segment I printed the properties with this code:

var pros = System.getProperties();
pros.list(System.out);

By running this from a TMC deployed job I got a large list, from which these I think are interesting:

audit.observability.metrics.context.workspace_id
audit.observability.metrics.context.task_id
audit.observability.metrics.context.task_execution_id
audit.observability.metrics.context.operator_type
audit.observability.metrics.context.operator
audit.observability.metrics.context.remote_engine_id
audit.observability.metrics.context.remote_engine_name
audit.observability.metrics.context.account_id
java.specification.version
user.timezone
os.name
os.version
os.arch
user.home
user.language
user.country