1 Reply Latest reply on Feb 12, 2017 10:15 PM by Matt Coles

    Alerts Dependent on Extracts

    john liptak

      Is it possible for an alert to be dependent on the success of a Tableau extract?  We have an alert scheduled to run at 7am.  Occasionally, the Tableau extract that it's based on fails.  If the extract fails or if the extract does not run in time then VizAlerts is sending emails based on an the results of an old extract.  Can this be prevented?



        • 1. Re: Alerts Dependent on Extracts
          Matt Coles

          Yes, but there's not a simple scheduling option that would enable that, so you need to use VizAlerts' innate abilities to do it.


          Since what determines whether an alert fires or not is wholly dependent on whether the data exists in the view or not, doing this is a matter of getting your data to appear when the extract is in a good state. There are a few ways to accomplish this.


          The first, which is probably the best, would be to check some data condition in the extract itself that would indicate that it is in a "healthy" state. This is usually pretty easy for something on a daily schedule. What you'd do is check a MAX date modified or created (or both) somewhere in the data, and check it against NOW(), and see how far behind it was. If the max date occurred more than 24 hours prior, it's likely that the extract failed. So you'd add that criteria as a filter in the viz, and voilà. If it's a frequent occurrence that the actual data being extracted doesn't have record updates on a daily basis, this would prevent the alert from going out in that event as well, perhaps--which could be a feature or a bug, depending on what you want.


          Another way to approach it is to actually check the Tableau Server PostgreSQL repository database for the operational record showing that the data extract itself did succeed within the last 24 hours. This data is only accessible by your Server Admin, so if that's not you, you may have a longer road to this solution. They could publish up the TS Background Tasks data source I built, pointed at the Tableau Server db, and ensure that you have been given access to the data. Then you'd blend that data into your viz, perhaps on some dummy calc you create like WorkbookName, check the MAX(Created At) date where the refresh was a success, and there you go. If you need a more concrete example, we can work through it...it's a little quirky.