Split one column into multiple columns with the Explode Columns service

Split one column into multiple columns with the Explode Columns service in Productsup.

You may have a column that includes a list of values and you would like each value in the list to have its own column. You can split the column into multiple columns, in this case, using the explode columns service.

Note

Make sure you have set a product identifier to use this service.

For example, you wish to split the color column in the below import data source:

id

color

1

red,green,blue

2

gray,black,blue

After applying the explode columns service, your output could look like this:

id

color_1

color_2

color_3

1

red

green

blue

2

gray

black

blue

Add the Explode Columns service

In order to add the Explode Columns service, you should:

  1. Navigate to your site

  2. Navigate to Data Services on the left-hand tab

  3. Click add service

  4. Add the explode columns service

  5. Give the service a name (if desired)

  6. Define a custom column prefix (if desired)

  7. Select whether to use the service on the import or intermediate level

    • this should be where the column is which you wish to explode

  8. Click add

  9. Select the column to be exploded/split

  10. Select the delimiter for where the data should be split

    • each time the service sees this delimiter, the before and after the delimiter will receive a split column

  11. Click save

explode.png

You can add multiple instances of this service by repeating the above process.

Edit an existing Explode Columns service

In order to edit settings for your Explode Columns service, you should:

  1. Navigate to your site

  2. Navigate to Data Services on the left-hand tab

  3. Click on the settings wheel

Delete an existing Explode Columns service

In order to delete your Explode Columns service, you should:

  1. Navigate to your site

  2. Navigate to Data Services on the left-hand tab

  3. Click on the settings wheel

  4. Scroll to the bottom of the page and click remove this service