Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Split Fields

 

Parent article

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

General

 
Split Fields step

The following fields are general to this transformation step:

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. Special characters can be set with the format $[value]. For example $[01], or CHAR HEX01 can be set as $[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 table

 

The fields in this table define the properties for each new field created by the split. For each new field, you must define the New field name, Type, and other properties.

Field Description
New field Specify the name of the new field created by the split.
ID Specify an identifier string in the field. If you specify an ID that does not match the existing ID in the field, the resulting field value is null.
Remove ID? Specify an ID to remove from the field in the output.
Type Select the field's data type from the drop-down list or enter it manually.
Length Specify the length of the field.
Precision Specify the number of floating point digits for number type fields.
Format Select the format mask (number type) from the drop-down list or enter it manually. See Common Formats for information on common valid date and numeric formats you can use in this step.
Group Specify the method used to separate units of thousands in numbers of four digits or larger, either a comma (,) as in 10,000.00 or a dot (.) as in 5.000,00.
Decimal Specify the symbol used to represent a decimal point, either a dot (.) as in 10,000.00 or a comma (,) as in 5.000,00.
Currency Specify the symbol used to represent currencies. For example, $ or €.
Nullif Specify a string to match in the field. When the field value matches the specified string, the field value is set to null.
Default Specify the default value of the field if it is null or empty.
Trim Type Select the trimming method (none, left, right, or both) to apply to a string if truncating the field before processing. Trimming only works when no field length is specified.

See Understanding PDI data types and field metadata to maximize the efficiency of your transformation and job results.

Example

 

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

Split Fields step example data

The result is four fields:

Split Fields example results

See also Split field to rows

Metadata injection support

 

All fields of this step support metadata injection. You can use this step with ETL metadata injection to pass metadata to your transformation at runtime.