Skip to main content

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.

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.


@ravenkopelmanThis worked. Thanks much.


Reply