Skip to main content

I am trying to merge some data with the FeatureMerger. There are two datasources. Merging should be done when:

AttributeA = AttributeB OR AttributeB = AttributeA

(It skips ahead if I only use one of these)

 

How do I do this? I guess I could use the text editor, but am unsure of the syntax. Or should I use the InlineQuerier for better results? Same thing there though, I don't know the correct syntax.

Hi @aron​ 

Did you try to use the transformer Tester?

There is the conditions that you can configure.

 

Thanks in Advance,

Danilo


Hi aron,

 

you could send the two datasources to an InlineQuerier ad use an sql script to make the join (see attached workspace that generates two dataset with attributes A and B with random numbers and sends them to an InlineQuerier), but if the values are not unique (as it probably happens in the attached workspace), you get a cartesian product. Maybe it is not what you want.

 

Hope that helps!


If it is only 2 conditions to test, fastest performing workspace would probably be one that makes use of FeatureJoiners which do attribute indexing and bulk mode processing, although the InlineQuerier based solutions I've also found usually reasonably quick.

 

FeatureJoiner Solution like so. Note, it is important that the last FeatureJoiner is a FULL Outer join by setting the Join Mode.

 

If there are NULL values in Attribute A or Attribute B, in either Feature Stream 1, or Feature Stream 2, then will also need to insert additional AttributeFilters before the FeatureJoiners to filter off Features that have NULL values for the Attribute Join being tested, as FeatureJoiner will Reject Features with NULL values in the Join Attributes.

capture


Reply