How can I debug problems with warehouse creation?

154 views Asked by At

When trying to create a warehouse from the Cloudant dashboard, sometimes the process fails with an error dialog. Other times, the warehouse extraction stays in a state of triggered even after hours.

How can I debug this? For example is there an API I can call to see what is going on?

1

There are 1 answers

0
Chris Snow On BEST ANSWER

Take a look inside the document inside the _warehouser database, and look for the warehouser_error_message element. For example:

 "warehouser_error_message": "Exception occurred while creating table.
   [SQL0670N  The statement failed because the row size of the 
   resulting table would have exceeded the row size limit. Row size 
   limit: \"\". Table space name: \"\". Resulting row size: \"\". 
   com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-670, 
   SQLSTATE=54010, SQLERRMC=32677;;34593, DRIVER=4.18.60]"

The warehouser error message usually gives you enough information to debug the problem.

You can view the _warehouser document in the Cloudant dashboard or use the API, e.g.

export cl_username='<your_cloudant_account>'
curl -s -u $cl_username -p \
 https://$cl_username.cloudant.com/_warehouser/_all_docs?include_docs=true \
 | jq [.warehouse_error_code]