Task
Category levels are stored in cat_1, cat_2, and cat_3. The result needs one category path without extra separators when a level is empty.
Short Answer
Create category_path from cat_1. Then append cat_2 and cat_3 only when the corresponding column is not empty.
How to Do It in Eofferix
- Create the final
category_pathcolumn fromcat_1. - In Transformations, add: condition source
cat_2, condition Not empty, action Add to end, result/ {cat_2}. - Add the second rule: condition source
cat_3, condition Not empty, action Add to end, result/ {cat_3}.
The rules check cat_2 and cat_3, not “current value — any”. An empty level will not add an extra separator. - Save the column settings.
Before / After
Before
source data| sku | cat_1 | cat_2 | cat_3 |
|---|---|---|---|
| SKU-1001 | Clothing | Jackets | Winter |
| SKU-1002 | Shoes | Running |
After
result| sku | category_path |
|---|---|
| SKU-1001 | Clothing / Jackets / Winter |
| SKU-1002 | Shoes / Running |