Reputation: 37
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));
Upvotes: 1
Views: 503
Reputation: 25895
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" ] |
Upvotes: 2