Skip to main content
Solved

Can you run a SQLExecutor transformer that takes a string as a parameter and uses it as part of the SQL statement to be executed?

  • July 27, 2021
  • 2 replies
  • 80 views

plynn
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 9 replies

I need to run a sql statement to determine if my workspace should run. If the sql statement returns any records, then I need to terminate the flow. If nothing is returned then it is okay to run the workspace. I would like to pass in a user parameter as a string to be used in the sql statement. Is this possible?

Best answer by redgeographics

In short: yes, you can build the query using attribute values, parameters etc.

You should probably look into the NoFeaturesTester to check if nothing comes back too

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

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • Best Answer
  • July 27, 2021

In short: yes, you can build the query using attribute values, parameters etc.

You should probably look into the NoFeaturesTester to check if nothing comes back too


plynn
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 9 replies
  • July 27, 2021

Thank you. I have added the NoFeaturesTester and it seems to be working well.