Given Kusto query
Table
| where type == "TYPE"
| summarize lastEventTime = arg_max(lastEvent, *), vmCount = count(), onboardedCount = countif(onboarded),
failVM = make_list_if(entity, onboarded == false and isnotempty(entity)), allVM = make_set(entity) by environmentType, osType, id , type
Now I want to split allVM count into 2 list first one containing first 100 elements and second one containing rest .
allVM1 = [... first 100 elements... ] (0-99)
allVM2 = [.. remaining ... ] (100- size of allVm)
if there are less than 100 elements than allVM2
should be empty.
How can i achieve the same ?
Assume onboarded
contains value true / false and entity
is a string
2
Answers
You just use
extend
aftersummarize
and create a substring of theallVM
field, I think I have your KQL here:array_slice could be just the thing you’re looking for.
I’ve edited your example code a little, hopefully though it’s transferable enough to your use case. I’ve removed
lastEventTime
, andid
.