This feature enables fine-grain control over when checks for persistent derived tables (PDT) are allowed to run against the database. It is enabled per connection and controlled by a cron string.
Which Customers Can Benefit From This Feature?
Customers with cloud databases that do not require 24/7 uptime can benefit.
It is a common practice to shut down or to “sleep” cloud databases during non-business hours. If you use this feature, Looker’s PDT checks can cause errors or cause these databases to wake up. Because of this, we expect that very few customers will need to use PDT advanced scheduling.
Keep in mind that Looker runs to decide whether or not to rebuild a persistent derived table, can cause errors or cause databases to wake up and incur unnecessary costs. Also, for cloud-based Hadoop clusters, PDTs may need to be rebuilt once the cluster comes back on-line.
How to Use It:
- Navigate to Database > Connections page under the Admin section.
- Select Edit for the desired database connection.
- PDTs must be enabled for this feature to work.
- In the text box labeled PDT And Datagroup Maintenance Schedule, enter a cron expression corresponding to the schedule you want to enable
sql_trigger_value
checks.- The timezone of the cron expression corresponds to the Looker application timezone, which is set under Settings > General.
- You can learn more about cron expressions in this Wikipedia documentation page.
- Note: This feature uses parse-cron v0.1.3 16, which doesn’t appear to support
?
in cron expressions.
Examples:
- To check PDTs every 5 minutes, during business hours, Monday through Friday, because the cluster is not active during off-business hours:
*/5 8-17 * * MON-FRI
- To check PDTs every 5 minutes, during business hours, every day, because the cluster is not active during off-business hours:
*/5 8-17 * * *
- To check PDTs every hour during business hours, Monday through Friday, because the cluster is not active during off-business hours:
0 8-17 * * MON-FRI
- To check PDTs every day at 3:01am:
1 3 * * *
If the PDTs are not being built, you can reset the cron string back to the default:
*/5
* * * *