将不同行的数据组合成一个字符串

Combining data from different rows to a string

我正在从数据表的单个列中获取数据。我需要将它组合成一个由逗号或任何定界符分隔的字符串。

最终结果应该是字符串而不是表格数据。

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

我需要将结果组合成一个带分隔符的字符串。

结果应该是:"apple,orange,grapes"

尝试将 strcat_array()summarize make_list() 组合如下:

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

此 returns 具有单个字符串列的单个 table,其值为:apple,orange,grapes