I have a basic query in Defender
DeviceInfo
| join DeviceNetworkInfo on DeviceId
| project DeviceId,NetworkAdapterType,IPAddresses
The result is a lot of repeating rows, I want to move this ---
Basically, I wanted to see if could "distinct" a column and roll up other columns into lists or arrays using make_set or make_list? I wasn't sure if this was possible... thanks!!!
I have reproduced in my environment and got expected results as below:
Below is the example kql
query which worked for me:
datatable(ID:int, DEPT:string, ADDRESS:dynamic)
[
8, "CSE", dynamic([1.2, "Rithwik"]),
8, "CSE", dynamic([1.3, "hello"]),
8, "ECE", dynamic([1.4, "Bojja"])
]
| summarize dep = make_set(DEPT), ipadress = make_list(ADDRESS) by ID
Output:
For your query you can integrate from summarize statement.
DeviceInfo
| join DeviceNetworkInfo on DeviceId
| project DeviceId,NetworkAdapterType,IPAddresses
| summarize dep = make_set(NetworkAdapterType), ipadress = make_list(IPAddresses) by DeviceId