# General

![Group By dialog](/files/gWyCRTDuVvTFfrYCda9E)

Enter the information in the options as shown in the following table:

| Option                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Step name**                              | Specifies the unique name of the Group By step on the canvas. You can customize the name or leave it as the default.                                                                                                                                                                                                                                                                                                                                                                |
| **Include all rows?**                      | <p>Select this check box if you want to include all rows in the output. Clear this check box if you only want to output the aggregate rows.</p><p>The following options are not available unless the <strong>Include all rows</strong> option is selected:</p><ul><li><strong>Temporary files directory</strong></li><li><strong>TMP-file prefix</strong></li><li><strong>Add line number, restart in each group</strong></li><li><strong>Line number field name</strong></li></ul> |
| **Temporary files directory**              | Specify the directory where the temporary files are stored. The default is the standard temporary directory for the system. You must specify a directory when the **Include all rows** option is selected and the number of grouped rows exceeds 5000 rows.                                                                                                                                                                                                                         |
| **TMP-file prefix**                        | Specifies the file prefix for naming temporary files.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Add line number, restart in each group** | Adds a line number that restarts at 1 in each group. When both **Include all rows** and this option are selected, all rows are included in the output with a line number for each row.                                                                                                                                                                                                                                                                                              |
| **Line number field name**                 | Specifies the name of the field where you want to add line numbers for each new group.                                                                                                                                                                                                                                                                                                                                                                                              |
| **Always give back a result row**          | Select this check box to return a result row, even when there is no input row. When there are no input rows, this option returns a count of zero (`0`). Clear this check box if you only want to output a result row when there is an input row.                                                                                                                                                                                                                                    |


---

# Agent Instructions: 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:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/group-by-landing-page-article/general-group-by-kettle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
