Skip to main content

Hi

 

 

I have a DB connection where only specific features are selected based on sql = ... in (1,2,3,12). See expample below.

example

Question is which tester gets excuted first? Whe there are connections like this to multiple transformers, how do I know what is going on in terms of order of execution.

 

You may want to try using FeatureHolder transformers. They will stall the flow of your data until all of records have reached a FeatureHolder. Also, the Readers are read in the order that you have added them to the workspace.

Hope this helps!


Apart from the hints given by @rycharg (and some trickeries involving the Sampler and/or FeatureMerger), it isn't easy to influence the order for processing inside a workspace. However, it is something that Safe has stated is in their plans, so feel to help it along by voting for this idea.


Depending on what the testing criteria are.

You can sort them by creating a tester attribute conform to your testers.

Create this sortkey conditional. This way you can have all objects to be tested sorted by priority.

A tester on the sortkey will let the first tested trough first etc..

Won't work of course if your testers need the full data set for every test. (if the test set have intersecting data)

(this is a trick we use to for instance get Autocad drawing order to submit to our demands..;))


Also of use can be to use a variable setter and reader combo with a waiter.

Waiter just scans if a certain variable has been set. (a custom loop that reads a variable to see if it is set. (On forum is example sonewhere called "waiter")

You can let the first on go trough, set a variable prior to writing to db.

Next in line scans for this variable etc.


I was always under the impression that the connection that is drawn first, is the first to fire. However, that's not something I would rely on. The best solution is to sort data, since the order of features will remain constant unless otherwise changed. So here I would use a Cloner (create 4 copies), Sorter (sort by _copynum), AttributeFilter (filter by _copynum). Connect 1 to the first Tester you want to happen, 2 to the next Tester, etc.

Of course, I doubt it's the order of the testing that is of concern, presumably it's something that follows on. If it is the order of writing data, there are parameters that can be used to control that.

I see @david_r mentions the possibility of new functionality. That will be in FME2016.1. However, I don't know if it will control this scenario. I think it's more for the order in which "feature creating" transformers (Creator, SQLCreator, etc) are executed. That should help in a lot of scenarios, just not here.

Regards

Mark

 

Mark Ireland

 

Product Evangelist

 

Safe Software Inc.

I was always under the impression that the connection that is drawn first, is the first to fire. However, that's not something I would rely on. The best solution is to sort data, since the order of features will remain constant unless otherwise changed. So here I would use a Cloner (create 4 copies), Sorter (sort by _copynum), AttributeFilter (filter by _copynum). Connect 1 to the first Tester you want to happen, 2 to the next Tester, etc.

Of course, I doubt it's the order of the testing that is of concern, presumably it's something that follows on. If it is the order of writing data, there are parameters that can be used to control that.

I see @david_r mentions the possibility of new functionality. That will be in FME2016.1. However, I don't know if it will control this scenario. I think it's more for the order in which "feature creating" transformers (Creator, SQLCreator, etc) are executed. That should help in a lot of scenarios, just not here.

Regards

Mark

 

Mark Ireland

 

Product Evangelist

 

Safe Software Inc.

Hi Mark, I was actually thinking more of some possible future functionality which could help define data flow order within the workspace. It was discussed at the VAR conference recently and there is also the idea in here that I linked to above. I have not heard about any specific plans for implementing it, though.


Reply