6

I am getting data from a single column in a datatable. I need it to be combine to a string separated by comma or any delimiter.

The end result should be a string instead of the tabular data.

let words = datatable(word:string, code:string) [
"apple","A",
"orange","B",
"grapes","C"
];
words | project word;

I need to combine the result combined into a string with a delimiter.

Result should be : "apple,orange,grapes"

1
  • try this: words | summarize makelist(word) , but it will have the string inside []. Commented Aug 13, 2019 at 9:00

1 Answer 1

17
Answer recommended by Microsoft Azure Collective

try combining strcat_array() with summarize make_list() as follows:

let words = datatable(word:string, code:string) [
    "apple","A",
    "orange","B",
    "grapes","C"
];
words
| summarize result = strcat_array(make_list(word), ",")

this returns a single table with a single string column, whose value is: apple,orange,grapes

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.