1
votes

is it possible extract unique word from column with Kusto?

Example text: an example text, an orange, text bold Get only words: an, example, text, orange, bold

I'm trying with this regex:

mytable | extend ff = extract_all(@'(\w+\b)(?!.*\1\b)', info));

1
I don't know your regex tool at all, but your current pattern is working in this regex demo. - Tim Biegeleisen

1 Answers

2
votes

you could try this, using set_union() on top of the output of extract_all():

print input = "an example text, an orange, text bold Get only words: an, example, text, orange, bold"
| extend unique_words = set_union(dynamic(null), extract_all(@"(\w+)", input))
input unique_words
an example text, an orange, text bold Get only words: an, example, text, orange, bold [
"an",
"example",
"text",
"orange",
"bold",
"Get",
"only",
"words"
]