Skip to main content
Solved

SQLExecutor Single Execution

  • August 24, 2015
  • 2 replies
  • 90 views

Hi,

 

 

I've created a workspace that reads from six tables in a PGDB file and does mutliple types of validation on each. I have set a global variable at the start of the process to 1 and each failure path writes what went wrong to an error log table in our database. The failure paths also set my global variable to 0. These all connect to a VariableRetriever then a Tester to see if ther were any failures.

 

 

What I would like is if even a single feature failed along the way, the workspace writes a failed status to the database using the SQLExecutor and stops. If nothing failed, it continues and writes the PGDB features to the database. The issue here is that the Tester outputs all failed features, so would execute the SQLExecutor multiple times and I just want it to run once.

 

 

Is there a way for the SQLExecutor to only run once, even with multiple features being input, or a way to remove the features so only one is passed in?

 

 

Thanks,

 

Nick

Best answer by takashi

Hi Nick,

 

 

I think the Sampler can be used to pick only one feature from the features coming from the Failed port of the Tester.

 

Sampling Type: First N Features

 

Sampling Amount 1

 

 

Takashi
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.

2 replies

takashi
Celebrity
  • Best Answer
  • August 24, 2015
Hi Nick,

 

 

I think the Sampler can be used to pick only one feature from the features coming from the Failed port of the Tester.

 

Sampling Type: First N Features

 

Sampling Amount 1

 

 

Takashi

  • Author
  • August 24, 2015
Hi Takashi,

 

 

Thanks for the quick response, that did the trick!

 

 

Nick