You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/ppl/cmd/chart.rst
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,24 +32,26 @@ Syntax
32
32
33
33
* **limit**: optional. Specifies the number of distinct values to display when using column split.
34
34
35
-
* Default: 10
36
-
* Syntax: ``limit=(top|bottom) <number>`` or ``limit=<number>`` (defaults to top)
37
-
* When there are more distinct column split values than the limit, the additional values are grouped into an "OTHER" category if ``useother`` is not set to false.
38
-
* Set to 0 to show all distinct values without any limit.
35
+
* Default: top10
36
+
* Syntax: ``limit=(top|bottom)<number>`` or ``limit=<number>`` (defaults to top)
37
+
* When ``limit=K`` is set, the top or bottom K distinct column split values are retained; the additional values are grouped into an "OTHER" category if ``useother`` is not set to false.
38
+
* Set limit to 0 to show all distinct values without any limit.
39
+
* Use ``limit=topK`` or ``limit=bottomK`` to specify whether to retain the top or bottom K column categories. The ranking is based on the aggregated values for each distinct column-split value. For example, ``chart limit=top3 count() by a b`` retains the 3 most common b categories; ``chart limit=top5 min(value) by a b`` selects the 5 b categories that contains smallest aggregated values. If not specified, top is used by default.
39
40
* Only applies when column split presents (by 2 fields or over...by... coexists).
40
41
41
-
* **useother**: optional. Controls whether to create an "OTHER" category for distinct column values beyond the limit.
42
+
* **useother**: optional. Controls whether to create an "OTHER" category for distinct column-split values beyond the limit.
42
43
43
44
* Default: true
44
-
* When set to false, only the top/bottom N distinct values (based on limit) are shown without an "OTHER" category.
45
+
* When set to false, only the top/bottom N distinct column-split values (based on limit) are shown without an "OTHER" category.
45
46
* When set to true, distinct values beyond the limit are grouped into an "OTHER" category.
46
-
* Only applies when using column split and when there are more distinct column values than the limit.
47
+
* Only applies when using column split and when there are more distinct column-split values than the limit.
47
48
48
-
* **usenull**: optional. Controls whether to include null values as a separate category.
49
+
* **usenull**: optional. Controls whether to group events without a column split (i.e. whose column split is null) into a separate "NULL" category.
49
50
50
51
* Default: true
51
-
* When set to false, events with null values in the split-by field are excluded from results.
52
-
* When set to true, null values appear as a separate category.
52
+
* When ``usenull=false``, events with a null column split are excluded from results.
53
+
* When ``usenull=true``, events with a null column split are grouped into a separate "NULL" category.
54
+
* ``usenull`` only applies to column split. Null values in the row split are handled in the same way as normal aggregations.
53
55
54
56
* **nullstr**: optional. Specifies the category name for rows that do not contain the column split value.
55
57
@@ -80,7 +82,8 @@ Syntax
80
82
Notes
81
83
=====
82
84
83
-
* The column split field in the result will become strings so that they are compatible with ``nullstr`` and ``otherstr`` and can be used as column names once pivoted.
85
+
* The fields generated by column splitting are converted to strings so that they are compatible with ``nullstr`` and ``otherstr`` and can be used as column names once pivoted.
86
+
* The aggregation metric appears as the last column in the result. Result columns are ordered as: [row-split] [column-split] [aggregation-metrics]
84
87
85
88
Examples
86
89
========
@@ -119,7 +122,7 @@ PPL query::
119
122
Example 3: Using over and by for multiple field grouping
0 commit comments