KQL Pipeline connection with Activity and Trigger

514 views Asked by At

In KQL I can connect ADFPipelinerun with ADFActivityrun by using CorrelationId (join). But now I want to join ADFPipelineRun with ADFTriggerRun but it doesn't work with the CorrelationId. I tried it with the RunId but the RunId is not available in my table from Trigger. So I don't know how to connect it.

The TriggerRun consist of values in the table like TriggerId, CorrelationId but not RunId. My ADF for TriggerRun and PipelineRun have both RunId but it is not the same. So I don't know which connection I need to make between those two.

And if it is possible between those three tables so I can make assumptions on where and how it went wrong in my log analytics.

Thanks!

A good answer please :)

1

There are 1 answers

0
Naveen Sharma On

The TriggerName and TriggerStartTime columns from the ADFTriggerRun database, as well as the PipelineName and PipelineStartTime columns from the ADFPipelineRun table, can be used to combine ADFPipelineRun with ADFTriggerRun. These columns can be used to make a connection between the two tables because they are shared by both of them.

Query to be implemented

ADFTriggerRun 
| join kind=inner 
(
  ADFPipelineRun 
  | project PipelineName, PipelineStartTime, RunId
) on TriggerName == PipelineName and TriggerStartTime == PipelineStartTime
| project TriggerName, TriggerStartTime, PipelineName, PipelineStartTime, RunId

Inorder to get RunId we need to create ADF instance. After creating ADF go to monitor then the pipeline run.

enter image description here