If I have a datagroup with a sql_trigger of ‘SELECT CURRENT_TIMESTAMP" (that is, it selects the
current date, hour, minute, and second), then how often will the cache be cleared by this datagroup?
Solved! Go to Solution.
Based on the information in the documentation: https://docs.looker.com/reference/model-params/datagroup#sql_trigger I would say that it would run cache every time (or every second) because the value returned will be different each time.
For PostgreSQL, for example the value of CURRENT_TIMESTAMP is:
2022-08-09 11:16:56.715328 +00:00
which means unless I have two queries in a microsecond, I wouldn’t hit the cache
Based on the information in the documentation: https://docs.looker.com/reference/model-params/datagroup#sql_trigger I would say that it would run cache every time (or every second) because the value returned will be different each time.
For PostgreSQL, for example the value of CURRENT_TIMESTAMP is:
2022-08-09 11:16:56.715328 +00:00
which means unless I have two queries in a microsecond, I wouldn’t hit the cache
Depends on how often your instance is set to check datagroup triggers, but whenever it checks it’ll clear cache and rebuild PDTs in that scenario
As often as the regenerator runs, which defaults to every 5 minutes.
Based on the information in the documentation: https://docs.looker.com/reference/model-params/datagroup#sql_trigger I would say that it would run cache every time (or every second) because the value returned will be different each time.
For PostgreSQL, for example the value of CURRENT_TIMESTAMP is:
2022-08-09 11:16:56.715328 +00:00
which means unless I have two queries in a microsecond, I wouldn’t hit the cache
I believe the answer is every 5 minutes. Because the SQL_trigger run base on regenerator schedule.
https://community.looker.com/technical-tips-tricks-1021/the-pdt-regenerator-process-23715