Skip to content

Commit

Permalink
Deterministic categorize csv test with category IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-elastic committed Sep 18, 2024
1 parent bf22956 commit cb64f98
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
categorize
required_capability: categorize

# Drop the category ID, because it's non-deterministic
FROM sample_data
| SORT message ASC
| STATS count=COUNT(), values=MV_SORT(VALUES(message)) BY category=CATEGORIZE(message)
| SORT count DESC, category ASC
| DROP category
| SORT category
;

count:long | values:keyword
3 | [Connected to 10.1.0.1, Connected to 10.1.0.2, Connected to 10.1.0.3]
3 | [Connection error]
1 | [Disconnected]
count:long | values:keyword | category:integer
3 | [Connected to 10.1.0.1, Connected to 10.1.0.2, Connected to 10.1.0.3] | 0
3 | [Connection error] | 1
1 | [Disconnected] | 2
;

0 comments on commit cb64f98

Please sign in to comment.