A supplier file stores SKU values with a regional suffix: 00123-CA, 00456-NY, 00789-TX. The final file only needs the code before the dash: 00123, 00456, 00789.
Create sku_clean from sku_raw. Add Remove after 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 after. Then add a second rule: current value contains-, actionRemove substring, value-.
The first rule keeps the beginning of the value up to the dash; the second rule removes the dash. Save the settings and check the preview:
00123-CAshould become00123, with leading zeros preserved.
Before / after
Before
source data| sku_raw | product |
|---|---|
| 00123-CA | Hudson desk lamp |
| 00456-NY | Maple wall shelf |
| 00789-TX | 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.