Skip to main content

I have two feature sets being joined with featurejoiner with approximately 50 attributes on the right and 50 on the left. I need to set ALL values of ALL unjoined attributes to uj_left or uj_right accordingly, in place of NULL (or is it MISSING?).

 

I've had some ideas but wondering about a best management practice here. Let me know if you have any ideas.

 

My test and concept ideas have included:

1) add attribute manager following unjoined ports and set values on each unjoined attribute. Two issues here, one is that the unjoined right port doesn't show the left attributes and vice versa. The second issue is that I have 100 attributes, so I'm looking for a more automated solution.

2) again add attribute manager following unjoined ports but this time just add one new attribute (join_status) and set the value accordingly uj_left, uj_right. Bring those streams together into a single transformer to then add a conditional value setter based on join_status. This seems doable, but am still scratching my head about one-by-one conditionally setting each of the 100 attributes.

 

Thx,

Tyler

FME(R) 2021.0.0.1 (20210315 - Build 21306 - WIN64)

Check out the NullAttributeMapper. This should let you easily map nulls and missings to a new value of your choosing.


Check out the NullAttributeMapper. This should let you easily map nulls and missings to a new value of your choosing.

Will do. Thx. Sounds like I'll have to be careful though because a NULL is not necessarily an UNJOIN.


Will do. Thx. Sounds like I'll have to be careful though because a NULL is not necessarily an UNJOIN.

I see, how do you know then if an attribute itself is UNJOINED ? Or is that the problem you're trying to figure out.


Will do. Thx. Sounds like I'll have to be careful though because a NULL is not necessarily an UNJOIN.

The featurejoiner has unjoined left and unjoined right ports, so it's clear which features did not join. The difficulty is the ports don't send out unjoined attributes (i.e. columns) so I can't assign values right then and there. It appears it's going to take a few more steps.


As @virtualcitymatt​ suggests, use the NullAttributeMapper. Connect the Joined, UnjoinedLeft and UnjoinedRight ports of the FeatureJoiner all to the same TestFilter, test for missing values of a relevant attribute, and pass the results to a NullAttributeMapper. See the attached demo workspace.

NullAttributeMapper


As @virtualcitymatt​ suggests, use the NullAttributeMapper. Connect the Joined, UnjoinedLeft and UnjoinedRight ports of the FeatureJoiner all to the same TestFilter, test for missing values of a relevant attribute, and pass the results to a NullAttributeMapper. See the attached demo workspace.

NullAttributeMapper

@geomancer​ , I think that's the ticket. Thanks for the great visual. Much appreciated. Tyler


Reply