Skip to content

Commit

Permalink
Make CATEGORIZE csv test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-elastic committed Sep 18, 2024
1 parent 942d799 commit 0c93423
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
categorize
required_capability: categorize

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

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
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]
;

0 comments on commit 0c93423

Please sign in to comment.