Hi,
We have all of our pdts on a time schedule (either every hour or every day), but this causes problems in two cases:
1 - The underlying table is being rebuilt -> the pdt is empty or misses some data
2 - The database currently has a high load -> running expensive pdts slows everything else down
In neither of these cases do we want the pdt to rebuild, what’s the best practice way to achieve this? My thoughts thus far have been to extract the sql triggers into a view in the database and have something like the below in every looker view. This allows us to force the value of the sql_trigger to not change in periods where cases (1) or (2) apply, but it feels like a really heavy solution to the problem.
sql_trigger_value: SELECT * FROM schema.pdt_trigger_values where view_name = 'VIEW NAME'
Any suggestions would be welcome
Thanks
Jake