PDT rebuilding every hour due to 'table not in scratch schema'

Hello,

I have a problem with several persisted derived tables that are set to rebuild overnight, but are actually being rebuilt hourly, with build reason ‘Table not in scratch schema’. This is happening to one with sql_trigger SELECT CURRENT_DATE and a group of others all triggered by the same datagroup trigger: 

SELECT FLOOR((EXTRACT(epoch from NOW()) - 60*60*2)/(60*60*24))

I can see multiple versions of each table in the looker scratch schema, and all are query-able in the SQL-runner. I’ve tried changing the max_cache_age in the datagroup, adding a persist_with to the explores and the tables are still being rebuilt hourly by the regenerator. This causes some lag on our systems as the tables are quite expensive to run, and is frustrating as the tables are designed to remain the same throughout the day. 

The tables in the datagroup reference eachother, so are cascading. The other table with its own trigger also references another derived table with the same SQL_trigger. Could it be that the dependencies are causing Looker to rebuild every hour? 

This is what the build schedule looks like - they rebuild overnight as per the SQL trigger, but also rebuild hourly because ‘table not in scratch schema’:

a2b3c499-1678-4ecd-9529-2c28275a0759.png

And for when they build overnight as part of a datagroup trigger, a similar pattern:

e27ab89b-2860-412a-a3bb-707e24fecab8.png

For reference, we’re using Postgres and our own hosted instance of Looker. 

0 1 312
1 REPLY 1

Bump

Top Labels in this Space
Top Solution Authors