-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathactivity_copy.kql
12 lines (11 loc) · 930 Bytes
/
activity_copy.kql
1
2
3
4
5
6
7
8
9
10
11
12
// ADF copy activities
let CopyActivity = ADFActivityRun
| where Status has_any ('Succeeded','Failed')
| where ActivityType == "Copy"
| extend DataFactory = substring(reverse(split(reverse(ResourceId),"/",0)),2,strlen(split(reverse(ResourceId),"/",0))-4)
| extend billing_data = parse_json(Output).billingReference
| extend bd = parse_xml(billing_data)
| extend activityType = bd.activityType, bdur = parse_xml(bd.billableDuration)
| extend meterType = tostring(bd.billableDuration[0].meterType), duration = toreal(bd.billableDuration[0].duration), unit = tostring(bd.billableDuration[0].unit), sessionType = tostring(bd.billableDuration[0].sessionType)
| project TimeGenerated, DataFactory, PipelineName, PipelineRunId, Status, computeType = meterType, coreCount = toint(1), duration, CorrelationId, ActivityRunId, Start=format_datetime(Start,'dd-MM-yyyy HH:mm:ss'), End=format_datetime(End,'dd-MM-yyyy HH:mm:ss');
CopyActivity