forked from bricrsa/azuredatafactory_loganalytics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline_linking.kql
21 lines (20 loc) · 1.33 KB
/
pipeline_linking.kql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
let PL_Layer1 = ADFPipelineRun
| where ResourceId contains "MAS-PRSN-CMN-ALL-XX-PROD"
| extend DataFactory = substring(reverse(split(reverse(ResourceId),"/",0)),2,strlen(split(reverse(ResourceId),"/",0))-4)
| where Status == "Succeeded"
| extend cpj = parse_json(Predecessors)
| mv-expand cpj
| extend CallingPipelineName = cpj.PipelineName, CallType = cpj.InvokedByType, CallingPipelineRunID = tostring(cpj.PipelineRunId);
let PL_Layer2 = ADFPipelineRun
| where ResourceId contains "MAS-PRSN-CMN-ALL-XX-PROD"
| extend DataFactory = substring(reverse(split(reverse(ResourceId),"/",0)),2,strlen(split(reverse(ResourceId),"/",0))-4)
| where Status == "Succeeded"
| extend cpj = parse_json(Predecessors)
| mv-expand cpj
| extend CallingPipelineName = cpj.PipelineName, CallType = cpj.InvokedByType, CallingPipelineRunID = tostring(cpj.PipelineRunId);
PL_Layer1
| join kind = leftouter PL_Layer2 on $left.RunId == $right.CallingPipelineRunID
| extend CalledPipeline = PipelineName1, CalledPipelineStart = Start1, CalledPipelineEnd = End1, CalledPipelineRunId = RunId1
| project-keep DataFactory, PipelineName, Start, End, RunId, CalledPipeline, CalledPipelineStart, CalledPipelineEnd, CalledPipelineRunId
| project-reorder DataFactory, PipelineName, Start, End, RunId, CalledPipeline, CalledPipelineStart, CalledPipelineEnd, CalledPipelineRunId
| order by Start