A supplier file stores SKU values with a regional prefix: CA-00123, NY-00456, TX-00789. The final file only needs the code after the dash: 00123, 00456, 00789.
Create sku_clean from sku_raw. Add Remove before for the - character, then add Remove substring with - to remove the remaining dash.
How to do it in Eofferix
Upload the CSV or XLSX file with the
sku_rawcolumn and open the table editor. The example keeps aproductcolumn next to it for row checking.Create the result column
sku_cleanfrom the source columnsku_raw.Open the settings for
sku_cleanwith the gear icon in the column header.
The animation opens the settings of the result column sku_clean.Add a rule: current value contains
-, actionRemove before. Then add a second rule: current value contains-, actionRemove substring, value-.
The first rule keeps the part from the dash onward; the second rule removes the dash. Save the settings and check the preview:
CA-00123should become00123, with leading zeros preserved.
Before / after
Before
source data| sku_raw | product |
|---|---|
| CA-00123 | Hudson desk lamp |
| NY-00456 | Maple wall shelf |
| TX-00789 | Trail travel mug |
After
result| sku_clean | product |
|---|---|
| 00123 | Hudson desk lamp |
| 00456 | Maple wall shelf |
| 00789 | Trail travel mug |
What to keep in mind
- This setup works when there is one stable separator, such as a dash.
- If the separator appears more than once, check which part of the value must remain.
- SKU values stay as text, so identifiers such as
00123keep their leading zeros.