You can use the Split Fields step to split a field into multiple fields based on a specified delimiter.
The following fields are general to this transformation step:
|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 |
|Enclosure||Enclose a field with a pair of specified strings. Use this option if you want separator characters in the fields.|
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.
|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.
The following settings split a SALES_VALUES field containing: "500,300,200,100" into four new fields:
The result is four fields:
See also Split field to rows