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.
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.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.