# Split Fields

You can use the **Split Fields** step to split a field into multiple fields based on a specified delimiter.

### General

| Field              | Description                                                                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Step name**      | Specify the unique name of the step on the canvas. You can customize the name or leave it as the default.                                                        |
| **Field to split** | Specify the name of the field you want to split.                                                                                                                 |
| **Delimiter**      | Specify the delimiter character that separates the fields. You can set special characters with the format `$[value]` (for example, `$[01]` or `$[6F,FF,00,1F]`). |
| **Enclosure**      | Enclose a field with a pair of specified strings. Use this option if you want separator characters in the fields.                                                |

### Fields

The fields in this table define the properties for each new field created by the split.

| Field          | Description                                                                                                                                   |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **New field**  | Name of the new field created by the split.                                                                                                   |
| **ID**         | Identifier string for the field. If the ID does not match the existing ID in the field, the output value is null.                             |
| **Remove ID?** | Specify whether to remove the ID from the output value.                                                                                       |
| **Type**       | Output data type.                                                                                                                             |
| **Length**     | Field length.                                                                                                                                 |
| **Precision**  | Floating point digits for number fields.                                                                                                      |
| **Format**     | Format mask. See [Common Formats](https://docs.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/common-formats). |
| **Group**      | Thousands grouping symbol.                                                                                                                    |
| **Decimal**    | Decimal symbol.                                                                                                                               |
| **Currency**   | Currency symbol (for example, `$` or `€`).                                                                                                    |
| **Nullif**     | String to match. If the output value matches this string, the value is set to null.                                                           |
| **Default**    | Default value if the output value is null or empty.                                                                                           |
| **Trim Type**  | Trimming method applied to strings. Trimming works only when no field length is specified.                                                    |

See [Understanding PDI data types and field metadata](https://docs.pentaho.com/pdia-data-integration/understanding-pdi-data-types-and-field-metadata) for guidance on field metadata.

### Example

The following settings split a `SALES_VALUES` field containing `500,300,200,100` into four new fields:

![Split Fields step example data](https://773338310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYwnJ6Fexn4LZwKRHghPK%2Fuploads%2Fgit-blob-5dd8229bac69c5cd4780695f4d4299ff3b422b76%2FPDI_SplitFields_ExampleData.png?alt=media)

The result is four fields:

![Split Fields example results](https://773338310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYwnJ6Fexn4LZwKRHghPK%2Fuploads%2Fgit-blob-272bf9302405ed09271a1c6137835a19466bcaab%2FPDI_SplitFields_ExampleResults.png?alt=media)

### See also

* [Split field to rows](http://wiki.pentaho.com/display/EAI/Split+field+to+rows)

### Metadata injection support

This step supports metadata injection. You can use it with [ETL metadata injection](https://docs.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/etl-metadata-injection) to pass metadata to your transformation at runtime.


---

# 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/split-fields.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.
