> 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/python-executor/options-python-executor/output-tab/variable-to-fields-processing.md).

# Variable to fields processing

Select the **Variable to fields** option if your script is intended to produce its output in the form of individual variables, each of which contains a built-in type, such numerics, strings, and Booleans. This option will map the Python variables and their data types to PDI fields and their data types when running the transformation.

![Output tab in Python Executor](/files/A6M9ANTPzv9G3EfNZ3ni)

These are the fields in the **Mapping** table. Select the **Get fields** button to populate the table with fields from the output step(s) in your transformation.

**Note:** The **Get fields** button will execute your Python script using random input values to determine the output variables. If your script is long running, or has fixed data requirements, consider manually entering the output variable mapping.

| Option               | Description                                                                                                                                                                                                                                                                                                            |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Variable**         | The name of the Python variable that will be mapped to a PDI field.                                                                                                                                                                                                                                                    |
| **Python data type** | The value of the data type of the variable. For detailed information on data types, see [Mapping data types from Python to PDI](/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/python-executor/options-python-executor/output-tab/mapping-data-types-from-python-to-pdi.md). |
| **PDI field**        | The value of the PDI field to which you want to map the Python variable.                                                                                                                                                                                                                                               |
| **PDI data type**    | The value of the data type assigned to the PDI field, such as a date, a number, or a timestamp.                                                                                                                                                                                                                        |


---

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

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/python-executor/options-python-executor/output-tab/variable-to-fields-processing.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.
