> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/discover-metadata-from-a-text-file/options-discover-metadata-from-a-text-file-step/input-tab.md).

# Input tab

![PDI\_Discover metadata from a text file Input tab](https://2745965000-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvZoINBz5C5WnDZQlbOJQ%2Fuploads%2Fgit-blob-10534d1aeb9a5a999e0991dbc126dc097895559b%2FPDI_Discover%20metadata%20from%20a%20text%20file%20Input%20tab.png?alt=media)

Use the following options in the **Input** tab to specify details for the input text file:

| Option                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **File name**                             | Select the delimited file you want to evaluate. The file location can be any location supported by a VFS connection. See [Connecting to Virtual File Systems](https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/data-integration-perspective-in-the-pdi-client/virtual-file-system-browser.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Trim fields**                           | Select this option to identify the field as an integer. Clear the option to indicate that the field is a string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Header column name detection strategy** | <p>Select the strategy you want to use to determine the column names in the file. Once a header row has been determined, any rows of data above that are ignored, the following rows are counted as data. The following strategies are available:- <strong>First possible line containing only strings</strong></p><p>Selects the first line that contains only string values as the header row. For example, if the data has 5 fields per row, and you set the <strong>Maximum number of header rows</strong> field to 6, the step searches the first 6 rows in the file for a row containing 5 string fields. The first row encountered with the 5 string fields is selected as the field name header. Any rows after the selected header row are considered as data, even if they are within the 6 header rows specified.</p><ul><li><strong>First possible line containing any data type</strong></li></ul><p>Selects the first line that contains a consistent number of fields as the header row. For example, if the file rows contain 5 fields, the first line containing 5 fields is selected as the header row within the <strong>Maximum number of header rows</strong> field, regardless of the data types in the rows.</p><ul><li><strong>Last possible line containing only strings</strong></li></ul><p>Selects the last line that contains only string values as the header row. For example, if the data has 5 fields per row, and you set the <strong>Maximum number of header rows</strong> field to 6, the step searches the first 6 rows in the file for a row containing 5 string fields. The last row encountered with the 5 string fields is selected as the field name header.</p><ul><li><strong>Last possible line containing any data type</strong></li></ul><p>Selects the last line that contains a consistent number of fields as the header row. For example, if the file rows contain 5 fields, the last line containing 5 fields is selected as the header row within the <strong>Maximum number of header rows</strong> field, regardless of the data types in the rows.</p> |
| **Maximum number of header rows**         | Enter the maximum number of rows that can be a header. If the file does not have a header row, set this to 0. Only one row can be a header.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Maximum number of footer rows**         | Enter the maximum number of rows that can be a footer. If the file does not have a footer row, set this to 0. **Note:** The number of footer rows can only be determined if the entire file is scanned.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Fallback charset**                      | Select the character set of the file. If the step is unable to determine a character set for the file, it defaults to the ISO-8859-1 character set. If an x86 platform is used, the file uses an ASCII character set.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Limit scanned rows**                    | Enter the number of rows to scan in the file before determining the valid set of delimiters and enclosures used in the file. To scan the entire file, enter 0 (zero).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/discover-metadata-from-a-text-file/options-discover-metadata-from-a-text-file-step/input-tab.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
