Alerts: Dynamic Frequency

minerkt
Participant IV

Hey all,

I want to set up alerting for a single value report on a dashboard, but with a custom frequency/cadence.

I am looking to set up a daily check on a report value, but once the threshold is met and the alert is fired, I want the alert to turn off or delay any future alerts for a week.

The purpose and hope is to flag a problem as soon as it appears, but I want to give the team receiving the alert a week to address the issue without flooding their email with alerts while they work on it.

Is there a way to set something like this up?

2 4 311
4 REPLIES 4

IanT
Participant V

One idea without going the API route: Create a schedule based on a datagroup with a sql trigger. Trigger would be something like select case when sum(errors) > 100 then 1 else 0 from mytable.

minerkt
Participant IV

I am still new to the finer details and abilities of Looker, is there any documentation you can point me towards for creating such a datagroup with a sql trigger?

Thank you for the response @IanT 

IanT
Participant V

Search looker datagroup

Here are the docs on datagroups.

You could create a SQLcase statement to create the datagroup. Here are some similar examples shown for the sql trigger which could serve as a base for the datagroup trigger. 

Similarly, you could use a pattern with the API like this. You could just add a check, was this already sent this week, if so end the function.