UPDATE: Tableau 10.0 has a feature that may render this example obsolete for you. Check out a side-by-side comparison of the two methods in this response
ALSO NOTE: This post and its attachments are not being maintained, so consider it a starting point / guide for what you're trying to do. As of this update, the recommended source of data for this would be TS Background Tasks.
One of the most asked-for email alerts that VizAlerts can accomplish is to notify owners of data extracts that fail to refresh for whatever reason on Tableau Server. There are a lot of different approaches to doing this. Toby Erkson's Alerts Alerter is another great example.
In this ready-to-use example, we'll use an Advanced Alert to send one email to every user if one or more of their extracts failed to refresh. If multiple items of theirs failed within a single hour, they'll all be consolidated into a single HTML table in the email. Inside the email we provide hyperlinks that will assist the user in taking the appropriate action to resolve the issue. Here is an example of the email that is sent.
It's worth noting that the "Extract Refresh History" link directs the user to the second tab of the alert workbook itself, and allows the user to see data on their own extract refreshes by virtue of a Data Source filter based on their Tableau Server username. They will need Interactor permissions (ideally) to the viz see this information. If this functionality isn't desired, simply change the Include Extract History Link value to False.
Steps To Deploy:
- Open attached workbook in Tableau Desktop (you'll need 9.0 or higher)
- When prompted to run Custom SQL, click "Yes"
- If prompted to sign in to your Tableau Server, go ahead and do so.
- When prompted for database credentials, click "Edit Connection"
- Set the server name to your Tableau Server PostgreSQL Repository host, and the password to whatever you set that password to be on your server
- Go to the Extract Failure Alert sheet and set:
- The Tableau Server Name parameter to your Tableau Server Name
- Admin Email to whatever email address the Tableau Server administrator uses.
- Timezone Offset from UTC (Hours) to the right offset for your timezone from UTC (this ensures correct dates are shown in the email)
- If you are publishing the workbook to a non-Default site, edit the field Item Hyperlink - Extract History so that the site name is added to the URL.
- Publish the workbook to your Tableau Server. Ensure the Authentication is set to "Embedded Credentials".
- Subscribe to it on an hourly VizAlerts schedule that runs on the hour. Emails will only be sent to you at this point. Take this opportunity to identify what errors and content your users will want to see, and which are going to be unhelpful. Adjust filters accordingly.
- Once you're satisfied with the results, change the Test Mode parameter to False. This will start emailing the actual owners, and optionally) cc-ing the Administrator.
Someday, I'd love to start mapping common errors out to a "Suggested Action" for each failure, so that this can become even more self-service. That's still a ways out yet, though.
Let me know if you have any questions! Hope this is helpful.