> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/stages/stages-list.md).

# Stages list

The following table lists all available XQL pipeline stages:

| Stage                                                                                                     | Description                                                                                      |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [`alter`](/xql-command-reference-guide/readme/stages/alter.md)                                            | Manipulate data by changing existing field values or creating new fields                         |
| [`arrayexpand`](/xql-command-reference-guide/readme/stages/arrayexpand.md)                                | Expand an array field into multiple rows                                                         |
| [`bin`](/xql-command-reference-guide/readme/stages/bin.md)                                                | Group numeric values into bins                                                                   |
| [`call`](/xql-command-reference-guide/readme/stages/call.md)                                              | Call a saved XQL query                                                                           |
| [`comp`](/xql-command-reference-guide/readme/stages/comp.md)                                              | Aggregate data using grouping and aggregate functions                                            |
| [`config`](/xql-command-reference-guide/readme/stages/config.md)                                          | Configure query settings                                                                         |
| [`dataset`](/xql-command-reference-guide/readme/stages/dataset.md)                                        | Specify the dataset to query                                                                     |
| [`dedup`](/xql-command-reference-guide/readme/stages/dedup.md)                                            | Remove duplicate rows                                                                            |
| [`fields`](/xql-command-reference-guide/readme/stages/fields.md)                                          | Select or exclude specific fields                                                                |
| [`filter`](/xql-command-reference-guide/readme/stages/filter.md)                                          | Filter rows based on a condition                                                                 |
| [`iploc`](/xql-command-reference-guide/readme/stages/iploc.md)                                            | Enrich IP addresses with geolocation data                                                        |
| [`join`](/xql-command-reference-guide/readme/stages/join.md)                                              | Join two datasets                                                                                |
| [`limit`](/xql-command-reference-guide/readme/stages/limit.md)                                            | Limit the number of rows returned                                                                |
| [`pivot`](/xql-command-reference-guide/readme/stages/pivot.md)                                            | Rotate row-level data into columns using aggregate functions                                     |
| [`preset`](/xql-command-reference-guide/readme/stages/presets.md)                                         | Apply preset configurations                                                                      |
| [`replacenull`](/xql-command-reference-guide/readme/stages/replacenull.md)                                | Replace null values with a specified value                                                       |
| [`search`](/xql-command-reference-guide/readme/stages/search.md)                                          | Search for records matching a text query                                                         |
| [`sort`](/xql-command-reference-guide/readme/stages/sort.md)                                              | Sort rows by one or more fields                                                                  |
| [`tag`](/xql-command-reference-guide/readme/stages/tag.md)                                                | Add tags to query results                                                                        |
| [`target`](/xql-command-reference-guide/readme/stages/target.md)                                          | Specify the target output for query results                                                      |
| [`top`](/xql-command-reference-guide/readme/stages/top.md)                                                | Return the top N rows by a specified field                                                       |
| [`transaction`](/xql-command-reference-guide/readme/stages/transaction.md)                                | Group events into transactions                                                                   |
| [`transpose`](https://github.com/jrosenpanw/doc_a/blob/main/Cortex_XQL_Command_Reference/Q4/transpose.md) | Transpose rows into columns                                                                      |
| [`union`](/xql-command-reference-guide/readme/stages/union.md)                                            | Combine the results of two or more queries                                                       |
| [`view`](/xql-command-reference-guide/readme/stages/view.md)                                              | Query a saved view                                                                               |
| [`windowcomp`](/xql-command-reference-guide/readme/stages/windowcomp.md)                                  | Perform analytic (window) functions over a defined window of rows without collapsing the dataset |

| Stage                                                                                                     | Description                                                                                      |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [`alter`](/xql-command-reference-guide/readme/stages/alter.md)                                            | Manipulate data by changing existing field values or creating new fields                         |
| [`arrayexpand`](/xql-command-reference-guide/readme/stages/arrayexpand.md)                                | Expand an array field into multiple rows                                                         |
| [`bin`](/xql-command-reference-guide/readme/stages/bin.md)                                                | Group numeric values into bins                                                                   |
| [`call`](/xql-command-reference-guide/readme/stages/call.md)                                              | Call a saved XQL query                                                                           |
| [`comp`](/xql-command-reference-guide/readme/stages/comp.md)                                              | Aggregate data using grouping and aggregate functions                                            |
| [`config`](/xql-command-reference-guide/readme/stages/config.md)                                          | Configure query settings                                                                         |
| [`dataset`](/xql-command-reference-guide/readme/stages/dataset.md)                                        | Specify the dataset to query                                                                     |
| [`dedup`](/xql-command-reference-guide/readme/stages/dedup.md)                                            | Remove duplicate rows                                                                            |
| [`fields`](/xql-command-reference-guide/readme/stages/fields.md)                                          | Select or exclude specific fields                                                                |
| [`filter`](/xql-command-reference-guide/readme/stages/filter.md)                                          | Filter rows based on a condition                                                                 |
| [`iploc`](/xql-command-reference-guide/readme/stages/iploc.md)                                            | Enrich IP addresses with geolocation data                                                        |
| [`join`](/xql-command-reference-guide/readme/stages/join.md)                                              | Join two datasets                                                                                |
| [`limit`](/xql-command-reference-guide/readme/stages/limit.md)                                            | Limit the number of rows returned                                                                |
| [`pivot`](/xql-command-reference-guide/readme/stages/pivot.md)                                            | Rotate row-level data into columns using aggregate functions                                     |
| [`preset`](/xql-command-reference-guide/readme/stages/presets.md)                                         | Apply preset configurations                                                                      |
| [`replacenull`](/xql-command-reference-guide/readme/stages/replacenull.md)                                | Replace null values with a specified value                                                       |
| [`search`](/xql-command-reference-guide/readme/stages/search.md)                                          | Perform free-text searches across ingested data                                                  |
| [`sort`](/xql-command-reference-guide/readme/stages/sort.md)                                              | Sort rows by one or more fields                                                                  |
| [`tag`](/xql-command-reference-guide/readme/stages/tag.md)                                                | Add tags to query results                                                                        |
| [`target`](/xql-command-reference-guide/readme/stages/target.md)                                          | Specify the target output for query results                                                      |
| [`top`](/xql-command-reference-guide/readme/stages/top.md)                                                | Return the top N rows by a specified field                                                       |
| [`transaction`](/xql-command-reference-guide/readme/stages/transaction.md)                                | Group events into transactions                                                                   |
| [`transpose`](https://github.com/jrosenpanw/doc_a/blob/main/Cortex_XQL_Command_Reference/Q4/transpose.md) | Transpose rows into columns                                                                      |
| [`union`](/xql-command-reference-guide/readme/stages/union.md)                                            | Combine the results of two or more queries                                                       |
| [`view`](/xql-command-reference-guide/readme/stages/view.md)                                              | Query a saved view                                                                               |
| [`windowcomp`](/xql-command-reference-guide/readme/stages/windowcomp.md)                                  | Perform analytic (window) functions over a defined window of rows without collapsing the dataset |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/stages/stages-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
