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:

FieldDescription
Step NameSpecify the unique name of the step on the canvas. You can customize the name or leave it as the default.
Field to splitSpecify the name of the field you want to split.
DelimiterSpecify 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].
EnclosureEnclose 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.

FieldDescription
New fieldSpecify the name of the new field created by the split.
IDSpecify 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.
TypeSelect the field's data type from the drop-down list or enter it manually.
LengthSpecify the length of the field.
PrecisionSpecify 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.
GroupSpecify 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.
DecimalSpecify the symbol used to represent a decimal point, either a dot (.) as in 10,000.00 or a comma (,) as in 5.000,00.
CurrencySpecify the symbol used to represent currencies. For example, $ or €.
NullifSpecify a string to match in the field. When the field value matches the specified string, the field value is set to null.
DefaultSpecify the default value of the field if it is null or empty.
Trim TypeSelect 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.

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.