# Single Threader

The Single Threader step executes a sequence of steps in a single thread. This can help you tune performance by limiting the number of threads/processors used.

Common use cases include:

* Reducing overhead in transformations with many steps (for example, less data passing and thread context switching).
* Sorting rows within a specific time frame or row count for near-real-time streaming.
* Processing data in chunks, pausing, and then continuing after reaching a chunk size.

For more background, see [White Paper on Single Threading in Pentaho Data Integration](http://www.ibridge.be/?p=200).

### General

| Field              | Description                                                                      |
| ------------------ | -------------------------------------------------------------------------------- |
| **Step name**      | Unique name of the step on the canvas. Default is **Single Threader**.           |
| **Transformation** | Sub-transformation to run in a single thread. Enter a path or select **Browse**. |

If you select a transformation that shares the same root path as the current transformation, PDI automatically replaces the common root with `${Internal.Entry.Current.Directory}`.

If you are working with a repository, specify the transformation by repository name; otherwise, specify the `.ktr` file path. |

### Options tab

![Single Threader Options tab](/files/Q2s3TZrT1DD9syJlEy3M)

| Option              | Description                                                                                                                                     |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Injector step**   | Step that satisfies the Mapping Input Specifications (for example, filename, type, length, and precision). Enter a step name or select **Get**. |
| **Retrieval step**  | Step from which data is retrieved. Enter a step name or select **Get**.                                                                         |
| **Batch size**      | Starts processing a chunk after N rows are received. Default is `100`. You can use **Batch time (ms)** instead.                                 |
| **Batch time (ms)** | Starts processing a chunk after the specified delay (instead of using **Batch size**).                                                          |

### Parameters tab

![Single Threader Parameters tab](/files/0A4LjAoMbTC2ux3sgBZf)

Use this tab to pass parameters to the sub-transformation.

| Option                                          | Description                                                                           |
| ----------------------------------------------- | ------------------------------------------------------------------------------------- |
| **Pass parameter values to sub transformation** | Passes all parameter values from the parent transformation to the sub-transformation. |
| **Parameter name**                              | Parameter name passed to the sub-transformation.                                      |
| **Fixed value**                                 | Parameter value. You can set it as:                                                   |

* a literal value (for example, `Sub transformation`)
* a variable or parameter (for example, `${Internal.Job.Name}`)
* a combination (for example, `${FILE_PREFIX}_${FILE_DATE}.txt`) | | **Get parameters** | Retrieves parameters defined in the sub-transformation. |


---

# 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/pdi-transformation-steps-reference-overview/single-threader.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.
