Skip to main content

I'm working on data transformation and trying to achieve a task using FME. I have a dataset with two columns(From and To), and I need to match values from one column(From) with values in another column(To).

The third column(ID) corresponds to the value present in col From, so eventually, I have to match the value in col From, find it in another col To, and populate the ID value(in new col ID2) in a new column.

Essentially, I want to find instances where a value from the first column exists in the second column.

Could someone guide me on how to set up an FME workflow to accomplish this? I got an understanding that it can be performed using AttributeCreator using Enable Adjacent Feature Attributes, though not sure if it can, and how!

I appreciate any help or insights you can provide. Thank you in advance for the assistance!

The ID1 values in the below image are IDs of col From. I have to populate ID2 values that refer to To column.

image

Is table above the raw input? could you please provide a completed example of what the table should look like after data transformation takes place?


With the data provided above (with at most a 1:1 relationship) this can be accomplished with a FeatureMerger.

From_To


Thank you @geomancer​ and @alexlynch3450​ for sharing the knowledge.

I tried running the wb although, I am still not getting the desired output with the sample workbench. Attaching the actual data here.

 


You get Rejected features because the attribute From has multiple occurences with the same value. For example: To has a value 'JOHN SEVIER' for a certain feature. In From there are 13 features with that value. These features all have a different value in ID_From. So which value for ID_From should FME choose?

This can be circumvented by setting 'Process Duplicate Suppliers' in the FeatureMerger, but there is no way of being certain that FME will pick the feature with the right ID_From.

From_To2


Reply