Skip to main content

Hello all,

I have a two roads datasets with a road_id, a through_distance_start and a through_distand_end

I want to do a merge, FeatureMerger, where;

road_id equals road_id

tdist_start equal to or greater than tdist_start

tdist_end equal to or less than tdist_end

How do I accomplish this in FeatureMerger? Or is there a different transformer?

Use FeatureJoiner rather than FeatureMerger where possible as FeatureJoiner has a higher performance, supports Bulk Mode etc.

 

Assuming what you mean is something like this:

SELECT *

FROM A INNER JOIN B ON (A.road_id = B.road_id)

WHERE A.tdist_start >= B.tdist_start AND A.tdist_end <= B.tdist_end

 

In FME the default equivalent of this is following steps:

  1. BulkAttributeRenamer to Table B.  Add String Prefix “B_”
  2. FeatureJoiner A to B.  road_id Join to B_road_id  (FeatureJoiner is equivalent to SQL JOIN)
  3. Tester tdist_start>=B_tdist_start AND tdist_end <= B_tdist_end (Tester is equivalent to SQL WHERE)

 

Or….alternatively can use InlineQuerier , with 1 input to Port A and 1 input to Port B and use the plain SQL above to give the results.  Works faster with large datasets, particularly where FeatureJoiner would give an exceedingly large number of results before the Tester.

 


Reply