View Command Error Logs
- GET /api/v1.2/commands/<Command-ID>/error_logs
Use this API to see the failed command’s error logs. However, this API is currently supported only on Hive and Presto queries, and Spark Scala/Spark Command-Line commands.
Required Role
The following users can make this API call:
Users who belong to the system-user or system-admin group.
Users who belong to a group associated with a role that allows viewing commands’ logs. See Managing Groups and Managing Roles for more information.
Request API Syntax
curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/v1.2/commands/<Command-ID>/error_logs"
Sample API Request
Here is a sample request of a failed Spark Scala command with 1200 as its ID.
curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/v1.2/commands/1200/error_logs"
Here is the sample response.
{
"error_log": "org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'products_orc_202' not found in database 'default';"
}