Skip to content

Commit d71e145

Browse files
committed
optimize doc
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent f934efa commit d71e145

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docs/user/ppl/cmd/appendpipe.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ appendpipe
1212
Description
1313
============
1414
| Using ``appendpipe`` command to appends the result of the subpipeline to the search results. Unlike a subsearch, the subpipeline is not run first.The subpipeline is run when the search reaches the appendpipe command.
15-
The appendpipe command is used to append the output of transforming commands, such as chart, timechart, stats, and top.
1615
The command aligns columns with the same field names and types. For different column fields between the main search and sub-search, NULL values are filled in the respective rows.
1716

1817
Version
@@ -32,7 +31,7 @@ This example appends rows from "total by gender" to "sum by gender, state" with
3231

3332
PPL query::
3433

35-
os> source=accounts | stats sum(age) as part by gender, state | sort -sum | head 5 | appendpipe [ stats sum(part) as total by gender ];
34+
os> source=accounts | stats sum(age) as part by gender, state | sort -part | head 5 | appendpipe [ stats sum(part) as total by gender ];
3635
fetched rows / total rows = 6/6
3736
+------+--------+-------+-------+
3837
| part | gender | state | total |
@@ -54,7 +53,7 @@ This example appends rows from "count by gender" to "sum by gender, state".
5453

5554
PPL query::
5655

57-
os> source=accounts | stats sum(age) as total by gender, state | sort -`sum(age)` | head 5 | appendpipe [ stats sum(total) as total by gender ];
56+
os> source=accounts | stats sum(age) as total by gender, state | sort -total | head 5 | appendpipe [ stats sum(total) as total by gender ];
5857
fetched rows / total rows = 6/6
5958
+----------+--------+-------+
6059
| total | gender | state |
@@ -74,7 +73,7 @@ This example shows how column type conflicts are handled when appending results.
7473

7574
PPL query::
7675

77-
os> source=accounts | stats sum(age) as total by gender, state | sort -`sum(age)` | head 5 | appendpipe [ stats sum(total) as total by gender | eval state = 123 ];
76+
os> source=accounts | stats sum(age) as total by gender, state | sort -total | head 5 | appendpipe [ stats sum(total) as total by gender | eval state = 123 ];
7877
fetched rows / total rows = 6/6
7978
+------+--------+-------+--------+
8079
| sum | gender | state | state0 |

0 commit comments

Comments
 (0)