Skip to main content
Solved

Run once for each feature or once on the collection?

  • March 23, 2022
  • 6 replies
  • 13 views

mattwilkie
Enthusiast
Forum|alt.badge.img+11

I'm working on a script someone else wrote. Is this stored SQL procedure going to be executed for once for each incoming feature, or once on the collection of features?

 

100,000 features feeding into an SQl Executor 

Best answer by redgeographics

The SQLExecutor will trigger once per feature, so in this case 100000 times.

 

If you only want to run it once you can use e.g. a Sampler to split off one feature to trigger it, or aggregate the data first (and then deaggregate later), although with 100000 features that's probably going to be a performance hit.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • Best Answer
  • March 24, 2022

The SQLExecutor will trigger once per feature, so in this case 100000 times.

 

If you only want to run it once you can use e.g. a Sampler to split off one feature to trigger it, or aggregate the data first (and then deaggregate later), although with 100000 features that's probably going to be a performance hit.


mattwilkie
Enthusiast
Forum|alt.badge.img+11
  • Author
  • Enthusiast
  • 92 replies
  • March 24, 2022

Thanks! I'm glad I took the time to ask. :-)


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • March 25, 2022

Thanks! I'm glad I took the time to ask. :-)

You're welcome! The HTTPCaller works in the same one (one request per feature) so I once ended up doing a DOS attack by mistake 😅


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • March 25, 2022

You're welcome! The HTTPCaller works in the same one (one request per feature) so I once ended up doing a DOS attack by mistake 😅

I haven't done that, but I have managed to send multiple emails by mistake. Thankfully I had a lot fewer features than 100,000


mattwilkie
Enthusiast
Forum|alt.badge.img+11
  • Author
  • Enthusiast
  • 92 replies
  • March 28, 2022

You're welcome! The HTTPCaller works in the same one (one request per feature) so I once ended up doing a DOS attack by mistake 😅

This case was almost the worst possible combination. It turns out the stored procedure was copying all records from one table to another, so 100,000 FME features * copy 540,000 rows. 😨


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • March 29, 2022

You're welcome! The HTTPCaller works in the same one (one request per feature) so I once ended up doing a DOS attack by mistake 😅

Oh wow! Yeah, that would have been bad!