Scheduling a Look - if results do not change

  • 27 July 2016
  • 3 replies

I like the feature where one can schedule a Look if there are results, and if results changed.

Wondering if it’s possible to include a feature where Looker sends out email if there are results and results haven’t changed since last delivery. Context being that if a table (in Google BigQuery) is not being updated regularly, this feature would notify us that data is not being uploaded as it should. Or if anyone has any hacks to get around this, that would be great!


3 replies

Userlevel 3

Hey @Alice_Ching,

For tables that always get new records, you can do a send email if there are no results. Then Looker could send an email out whenever records are empty. For example each day run a query doing a COUNT(*) against an always changing table with a last 24 hours filter on it(or a smaller period.)


Thanks @mikhailxu! Is there a way for Looker to send email if counts did not change for the last hour (or any given period) because that would indicate data did not load for the last hour (or any given period)? This is more like an alert for tables that should get new records but are not getting new records.

I know this is an incredibly late reply, but I thought I’d share my solution as I can’t understand why something as simple as custom timestamp filters aren’t available in schedules.

I’ve created some LookML (for Redshift) to derive a dimension:

  dimension: within_last_hour {
label: "Within Last Hour"
type: yesno
sql: DATEDIFF(HOUR, ${TABLE}.created_timestamp, GETDATE()) = 1 ;;

I then pull this field into my dashboard with defaults changed to advanced and “is [null]” so my dashboard doesn’t filter anything by default.

The schedule can then reference this filter set to ‘Yes’, and I finally have the means to isolate records within the last hour.

If I needed a more flexible range I’d change the yesno type to a number and filter for a specific numeric range (<= 12, for example, would be within 12 hours), but it seems I’ll only ever need the “last hour”.