I had like to categorise these items using a lookup table (excel/csv) , where I have can write down which has a structure. PS : This table is more than 250+ items
Contains | Category
Carton | Packaging
Polybag | Packaging
Cow | Raw Material
Sheet | Raw Material
Expected Output
7 Ply 4X4 Carton | Packaging
36" Polybag | Packaging
39" Polybag | Packaging
Cow leather | Raw Material
Just an idea … but the IF transform can be a pain depending on the number of categories. I’m sure there are better Javascript solutions for this step (but I’m not a programmer).
In case of higher volume in source data which might be too large for Cross I would build currently a solution to split the source into multiple files, maybe using the row numbers and output into multiple files. Then process the smaller portions using the batch mode and in a last step combine the results again into one file. I think this a simple approach instead of maintaining a if with too many arguments.
But if the solution with Cluster works it is the best with current functionality given.
@Anonymous you are the Master. I did thought about Extract, too, but without knowledge of Regex, I had no clue.
But I can imagine it can get more complex if the terms in column 1 get longer and the key is just somewhere in the term.
It is not an issue, the idea is that you extract the text out of the column that is needed for the lookup and then simply use it for the lookup, that is why I was asking for the whole data set, to see different patterns.
Here a more generic solution, since EDT only goes row by row and the only transform that takes a value and goes through a list of data and return value if it matches the condition is Lookup and since at the moment Lookup does not support contains search, we can make one our own.
This is a masterclass in using EDT in a very different way , I ran this with the 11,000 row set as well and EDT using JS didn’t crawl on my M1 which I anticipated
This is good enough to get started .
@Admin , maybe this is something you can add as native option in 1x or 2x . The use case we discussed beside matching category to items was also to match blacklisted_domains containing email / domain from massive list of emails .