Skip to main content
Released

Catch SQL Executor errors

Related products:FME Form
  • February 1, 2016
  • 8 replies
  • 31 views

Forum|alt.badge.img+5

If your Sql executor crashes, your workbench crashes.

So is it possible to add a new output (Failed) for Sql Executor ? this new feature would be very appreciated...

Or what is the best thing to catch every exception of Sql Executor ?

Thank you

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.

8 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • February 1, 2016

The new SQL Editor, used in all SQL transformers in FME 2016 has an option to test SQL statements.

You can read all about it in this blog by @Mark2AtSafe:

http://blog.safe.com/2015/10/fmeevangelist139/


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • February 1, 2016

There is a little know option in the SQL transformers that somewhat handles this problem. If you prefix your SQL Statement with a hyphen "-" then if the command fails, the SQL transformer continues on. e.g. if you have the following in your SQL Statement

- DROP TABLE test_table;

CREATE TABLE test_table ....

then if "test_table" doesn't exist the DROP TABLE command will fail but the SQL transformer will ignore the error and continue processing.


Forum|alt.badge.img+5
  • Author
  • February 2, 2016

Thank you !

This option is only available for 2016 ?


Forum|alt.badge.img+5
  • Author
  • February 2, 2016

Thank you !


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • February 6, 2016

Sounds like it might be time for a <Rejected> Port. I'll alert the appropriate authorities.


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • February 15, 2016

No it has been around for a long time.


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • February 15, 2016

The <Rejected> Port has been added to the SQL transformers in FME 2016.0.

Now in the above example

FME_SQL_DELIMITER ; - DROP TABLE test_table; CREATE TABLE test_table ....

the SQL transformer will continue to ignore the failed DROP command.

However

FME_SQL_DELIMITER ; DROP TABLE test_table; CREATE TABLE test_table ....

will result in output via the <Rejected> port with an attribute _reader_error detailing the error message.

'


Forum|alt.badge.img+2
  • February 16, 2016

Didn't know that one. Just tried it with SQL Statement To Execute Before Translation and works there too!