tableau / community-tableau-server-insights

Community-built data sources for answering questions about Tableau Server
MIT License
127 stars 52 forks source link

Identifying suspended extract refresh failures #41

Closed arunyadav19 closed 2 years ago

arunyadav19 commented 4 years ago

Sir,

Is there any way we can identify LUID's or some other way to identify those extract refresh schedules which are in suspended state so that they can be removed.Instead of deleting the schedule ( which might be used by other users as well) , I would remove the individual extract refresh task set on that particular workbook.

Reason behind doing this is: To reduce the error failure rate in an extract heavy environment.

mcoles commented 4 years ago

Right now, using TS Background Tasks, the only way would likely be to use the Notes field to look for "suspended", and the grab the workbook/data source LUID, and track down the appropriate Task LUID via the REST API. But, we should add a few things to TS Background Tasks to make this easier:

Add Task LUID Add consecutive failure count Add "suspend_state" field from any item tables it exists in (just data_alerts and metrics at this time..this may have to be done carefully, as having it NULL for more popular items, such as workbooks and data sources could be pretty confusing)

arunyadav19 commented 4 years ago
Screenshot 2020-05-15 at 4 26 22 PM

Not sure if my screenshot is visible . I used TS Background Tasks ( big Thanks to you for all these data sources) , used this column "Job LUID" to get Luid's of these suspended tasks and copied all these luid's in a excel sheet.

Then used this below mentioned code to remove these failed extract schedules by providing these LUID's but it did not work. It

url1 = "https://tableauserver.com/api/3.7/sites/siteid/tasks/extractRefreshes/"
url2=url1+cell
response = requests.request("DELETE", url2,headers=headers, data = payload)
arunyadav19 commented 4 years ago

Looks like I'm missing something or not looking at right place. Would you mind sharing a solution working for you ?

mcoles commented 4 years ago

Job LUID is different than Task LUID. That's why I was saying I think you'd have to get the actual Item LUID for the workbook/data source, then obtain the Task LUIDs based on those.

mcoles commented 2 years ago

This was added as the field named "Task State"--just in case anyone was looking for "Is Suspended", and not finding it...like I was for the last half hour, despite being the one who added it.