# Get files Row Count

## ![](/files/RodJafgUFpoDTSh5JLOk) Get files Row Count

### Description <a href="#description" id="description"></a>

The Get Files Row Count transform counts the number of rows in a file or set of files.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

#### File tab

| Option                                     | Description                                                                                                                                                  |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Transform name                             | Name of the transform. This must be unique within the pipeline.                                                                                              |
| Get filename from field                    | Whether the file name is taken from the specified field.                                                                                                     |
| Filename from field                        | Specify the field to read the file name from.                                                                                                                |
| File or directory                          | Specify the path to the file or files you want to count rows for.                                                                                            |
| Add                                        | Click to add the specified file, directory, and regular expression to the Selected files list.                                                               |
| Browse                                     | Click to select a file or directory.                                                                                                                         |
| Regular Expression                         | If you want to load multiple files, an expression that matches the files you want to use.                                                                    |
| !GetFilesRowsDialog.ExcludeFileMask.Label! | If you want to exclude files in the directory, an expression that matches the files to exclude.                                                              |
| Selected files                             | Lists the files that you have selected to use with this transform, including the location of each and the regular expression used to match or exclude files. |
| Delete                                     | Click to remove a selected file from the list.                                                                                                               |
| Edit                                       | Click to modify a selected file in the list.                                                                                                                 |
| Show Filenames                             | Click to view all files that will be used.                                                                                                                   |

#### Content tab

| Option                         | Description                                                                                                                                                                                                                                                                                    |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Rows Count fieldname           | The name of the field to store the row count in.                                                                                                                                                                                                                                               |
| Rows Separator type            | Select they type of character that defines the end of a line, either a carriage return, line feed, tab, or custom character.                                                                                                                                                                   |
| Row separator                  | If you are using a custom character, the character that defines the end of a line.                                                                                                                                                                                                             |
| Perform smart count            | If not selected, the count returns the number of separators in the file. If selected, an extra pass is performed to try to return the actual number of lines. This can be used in cases where the row separator is the same as the column value delimiter or if the file contains blank lines. |
| Include files count in output? | Whether the file count is included in a field in the output.                                                                                                                                                                                                                                   |
| Files Count fieldname          | The name of the field to store the output file count in.                                                                                                                                                                                                                                       |
| Add filename to result         | Whether the file names are included as a field in the output.                                                                                                                                                                                                                                  |


---

# 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.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/getfilesrowcount.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.
