Skip to main content
Solved

Performance on Netezza writer

  • October 5, 2017
  • 2 replies
  • 34 views

fmeuser_gc
Contributor
Forum|alt.badge.img+9

There's a workspace which is writing to Netezza.

Included GENSTATS query as End sql in Netezza writer, but it gives the below error.

ERROR: GENERATE STATISTICS cannot run inside a BEGIN/COMMIT block or stored procedure.

Any thoughts or workaround is appreciated.

Best answer by ravenkopelman

End SQL is likely being executed in the final feature-writing transaction; you can probably avoid that by calling COMMIT yourself in your End SQL, right before GENERATE STATISTICS.

That being said, End SQL is unlikely to expose the results of GENERATE STATISTICS (unless you are saving them to a table?). You might need a FeatureWriter followed by a SqlExecutor to get the result you want.

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

ravenkopelman
Safer
Forum|alt.badge.img+1
  • Safer
  • Best Answer
  • October 5, 2017

End SQL is likely being executed in the final feature-writing transaction; you can probably avoid that by calling COMMIT yourself in your End SQL, right before GENERATE STATISTICS.

That being said, End SQL is unlikely to expose the results of GENERATE STATISTICS (unless you are saving them to a table?). You might need a FeatureWriter followed by a SqlExecutor to get the result you want.


fmeuser_gc
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • October 5, 2017

@ravenkopelmanThis worked. Thanks much.