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