If your data feed contains a column with a list of values, you can split the column into multiple columns using the Explode Columns data service.
For example, you have the following data at the import stage and wish to split the color
column:
id | color |
---|---|
1 |
|
2 |
|
After applying the Explode Columns data service, your output may look similar to the following:
id | color_1 | color_2 | color_3 |
---|---|---|---|
1 |
|
|
|
2 |
|
|
|
Note
The Explode Columns data service is available for the import and intermediate stages.
To set up the Explode Columns data service, you need:
A product identifier. See Set a product identifier for more information.
A column in your feed that contains a list of values separated by a delimiter.
Go to Data Services from your site's main menu and select ADD SERVICE.
Search for Explode Columns, select Add, and give it a desired name and column prefix.
By default,
___exploded
is the column prefix.Choose the stage containing the columns you want to split in Service Data Level and select Add.
Select the column you want to split from the drop-down list Column that will be split into multiple columns.
Note
If you choose Import in Service Data Level in Step 3, the drop-down list Columns that will be split into multiple columns displays the columns of your import stage. If you choose Intermediate, the drop-down list contains your intermediate-stage columns.
In Delimiter, select the delimiter that separates the values in the column you want to split.
Select Save.
Repeat steps starting with Step 4 if you want to split more columns with the Explode Columns data service. The platform shows all exploded columns in a table at the bottom of the data service setup page.
For the platform to process a new data service, select Run in the top-right corner of your site's view.
Go to Data Services from your site's main menu.
Search for your data service.
Select the cogwheel icon (⚙) next to the desired data service to edit settings.
Select Save.
Go to Data Services from your site's main menu.
Select the cogwheel icon (⚙) next to the desired data service.
In the Danger Area panel, select Remove this service.
Select Yes.