I have a process where I get data in from one resource (source) and output into a cleaner output file (destination). I use a translation or mapping table (map) to categorize the data from the source before it gets put into the destination. So it is something like this in a process flow:
Source --> Map --> Destination.
My problem is the source file has a field that, at times, contains numerous values separated by a semicolon. For example, the field (called Type
) might contain values Lemon; Orange; Grape
.
In my Map table I only have certain values that I want to map between source and destination. In the above example, I would only want to map the Lemon
and Orange
values to the destination. In my Map table I have this:
| Source | Destination | ------------------------- | Lemon | Citrus | | Orange | Citrus |
I have these values separated in the Map because in the source table the Type field can contain only 'Lemon', 'Orange', 'Grape', or multiple values like mentioned above ('Lemon; Orange; Grape').
Is it possible to extract just the Lemon
and Orange
values from the source when there are multiple values in the Type
field through a join or some other way? I do not want to put in every combination from the Type field from my Source table into the Map table and the 'Type' values order changes consistently.
My goal is to be able to get each value from the 'Type' field to map from the source to the proper field in the destination even when there are multiple types.