Splitting String attribute values

The Split transformation creates one or more new attributes from the original value. You can only split String attributes.

For example, the values of a Vehicle Type attribute for vehicles consists of the vehicle make and model separated by a colon (Honda:Civic, Toyota:Camry). You could then use the split transformation to create a Make attribute and a Model attribute.

You can split a value:
  • Based on a delimiter.

    For example, you might split the attribute after a comma or colon. If the delimiter occurs multiple times, the value is split after the first occurrence.

  • At a specific position in the text.

    For example, you might split the attribute after the fourth character.

    So if a Vehicle Type included the year (1995 Civic, 2003 Camry), then by splitting the value after the fourth character, you could create a Year attribute and a Model attribute.

  • After specific text.

    For example, split the attribute after the word "type".

To split String attribute values:

  1. In the Catalog, select a project.
  2. Select Transform.
  3. Locate an attribute that contains values you want to split into multiple values and select the column.
  4. From the transform menu, select Basic > Split.
  5. Choose a split method from the list and its corresponding delimited or position (as described above).
  6. In New Attribute Name, specify the name of the attribute you want to create based on the split.
  7. Either click Preview to see the previewed results of running the transformation, or click Add to Script to save the transformation step to the script.

If you are done making changes to the project data set, you can commit the changes. See Running the transformation script against a project data set.