Skip to main content
Solved

Performance on Netezza writer


fmeuser_gc
Contributor
Forum|alt.badge.img+8

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.

View original
Did this help you find an answer to your question?

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+8
  • Author
  • Contributor
  • October 5, 2017

@ravenkopelmanThis worked. Thanks much.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings