# Split Fields

## ![](/files/TywTPd4FszizVzTlvEky) Split Fields

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

The Split Fields transform splits a field into multiple fields based on a specified delimiter.

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

### Options

| Option         | Description                                                                                                                                                                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transform name | Name of the transform; this name has to be unique in a single pipeline                                                                                                                                                                         |
| Field to split | The name of the field you want to split                                                                                                                                                                                                        |
| Delimiter      | Delimiter that determines the field. Special characters (e.g. CHAR ASCII HEX01) can be set with the format $\[value], e.g. $\[01] or $\[6F,FF,00,1F].                                                                                          |
| Enclosure      | You can specify an enclosure string which when placed around a value allows delimiters to be present in it. For example with a comma (,) delimiter: `aaaa,"123,456",ccc` can be resolved to 3 fields using enclosure `"`.                      |
| Escape string  | To include delimiter characters in values sometimes an escape string is used like backslash, double backslash and so on. For example with a comma (,) delimiter: `aaaa,123\\,456,ccc` can be resolved to 3 fields using escape character `\\`. |
| Fields table   | This table is where you define the properties for each new field created by the split. For each new field, you must define the field name, data type, and other properties.                                                                    |

### Examples

Below are examples of split fields:

#### Example 1

SALES\_VALUES field containing: "500,300,200,100"

Use these settings to split the field into four new fields:

* Delimiter: ,
* Field: SALES1, SALES2, SALES3, SALES4
* Id:
* remove ID no, no, no, no
* type: Number, Number, Number, Number
* format: ., ., ., .
* group:
* decimal: .
* currency:
* length: 3, 3, 3, 3
* precision: 0, 0, 0, 0

#### Example 2

SALES\_VALUES field containing "Sales2=310.50, Sales4=150.23"

Use these settings to split the field into four new fields:

* Delimiter: ,
* Field: SALES1, SALES2, SALES3, SALES4
* Id: Sales1=, Sales2=, Sales3=, Sales4=
* remove ID yes, yes, yes, yes
* type: Number, Number, Number, Number
* format: ., ., ., .
* group:
* decimal: .
* currency:
* length: 7, 7, 7, 7
* precision: 2, 2, 2, 2


---

# 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/splitfields.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.
