问题
When I execute a SQL statement in Impala using Python/Impyla, I am just getting an exception with a generic error message like ""Operation is in ERROR_STATE". How do I get more detailed information about the error that occurred?
回答1:
The cursor object has a _last_operation field that can be used to get more detailed information. E.g.
try:
cur.execute(sql)
except Exception, e:
op = cur._last_operation
abort(400,"ERROR: %s"%op.get_log())
Output might be:
Complete (0 out of 0)
Error while flushing Kudu session
Already present: key already present
来源:https://stackoverflow.com/questions/36760236/getting-detailed-impyla-error-message