Question

Alerts: Dynamic Frequency

  • 26 July 2021
  • 4 replies
  • 72 views

Userlevel 1

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?


This topic has been closed for comments

4 replies

Userlevel 6
Badge

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.

Userlevel 1

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 

Userlevel 6
Badge

Search looker datagroup

Userlevel 4
Badge

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.