Reputation: 138
Is there a way to concatenate a column in Kusto KQL?
For example, for some world
dataset with a column name
in MySQL (v8):
select group_agg(name) from world;
would result in:
| string_agg |
|-----------------------------------------------|
| Afghanistan,Azerbaijan,Bahrain,Bangladesh,... |
Upvotes: 5
Views: 2134
Reputation: 7618
Use make_set to create dynamic array of the unique values and then you can use strcat_array to get a string value of the list. For example:
StormEvents
| take 10
// get array of the distinct values
| summarize make_set(State)
// get a string value of the array
| extend states = strcat_array(set_State, ", ")
Upvotes: 9