span8
span4
span8
span4
Hi there,
I have two tables that I want to merge using feature joiner. I am doing a left join. I want all the rows of the left table to come in the output table. When I ran the program, most of the rows from the left table, however, I found that about 100 records went into the rejected output field. When I investigated I found that the column I used from the left table to join has null values and that goes into the rejected output field. Could anyone guide me on how could I make sure that all records from left table come to the output table?
When dealing with Null, Missing or Empty values on either the Left or Right Hand side, use an AttributeFilter like so. AttributeFilter works well because it is bulk mode enabled and is very fast, and as FeatureJoiner is also bulk mode enabled the 2 Transformers combined produce the best performance.
I'm not sure if there is a simple solution here, but I think you have two options.
Option 1:
If you would like you continue using the FeatureJoiner I think you will have to change your null values so that they can be processed. You can do this using the NullAttributeMapper, set the selected attribute to the one you are joining on and Map To = 'Empty String' or 'New Value'. These features would now come out of the Joined port and if necessary you could revert this change after the join.
Option 2:
Replace the FeatureJoiner with a FeatureMerger, this has more configurable parameters and there is an option for handling Null keys. However the FeatureMerger does not perform a complete left join so even if you set Reject Null and Missing Keys to know all these features will pass from the UnmergedRequestor output port so you will have to pass this along with the Merged features to your downstream workflow.
Option1 did not produce the desired result. In fact, the output gives more record numbers than the left table. I don't want to replace faturejoiner with featurejoiner.
© 2020 Safe Software Inc |Legal