Customized Alert (Recent drop data, SQL assert)

user19490
user19490 Member
edited March 2023 in Datasets

Is there a way to alert for drop in data for most recent date? (e.g. SQL assert when recent day=0)?

Best Answer

  • ST_-Superman-_
    Answer ✓

    I would probably create a card just for this alert.  Your summary number would be a beastmode.  Something like this:

     

    SUM(CASE WHEN `Date_Field`=CURDATE() THEN `users` else 0 end)

    You could then schedule an alert on this card to contact you anytime the summary number was equal to 0.

     

    You can even schedule the time that the alert will check if you want to wait until a specific time.  (otherwise, I think that you would get an alert everyday around midnight)


    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman

Answers

  • I have alerts built around age of datasets, an alert when total sales = 0, an alert around the last date that we received a service ticket...

     

    What, specifically, are you wanting to be alerted on?  I am not aware of an ability to add SQL like assertions to Domo datasets.


    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
  • Hey, thanks for the response!

     

    Interesting, I believe that is something I am looking for.

     

    I would like to be alerted on:

     

    Every day, we have an expected SUM(users). Typically, this number is >0. However, when it it is 0, then that means data may have not came in from another dataset or etc. 

     

    Therefore, for, say today 5/7/19, I want to be alerted that a 0 value occured.


    Note: I saw that alerts have total amount of values be = 0, but I want something like "recent day/today, if 0, then alert me)". 

              Considerations: I thought about a % difference -, but if I did that, would it be 100% negative direction?

     

    Looking forward to your response!

  • ST_-Superman-_
    Answer ✓

    I would probably create a card just for this alert.  Your summary number would be a beastmode.  Something like this:

     

    SUM(CASE WHEN `Date_Field`=CURDATE() THEN `users` else 0 end)

    You could then schedule an alert on this card to contact you anytime the summary number was equal to 0.

     

    You can even schedule the time that the alert will check if you want to wait until a specific time.  (otherwise, I think that you would get an alert everyday around midnight)


    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
  • You, you, are my Super(wo)man. 

     

    Good trick--thank you!