How often will the cache be cleared by this data group which using sql_trigger?

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 Solved
3 4 381
1 ACCEPTED 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

View solution in original post

4 REPLIES 4

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
Top Labels in this Space
Top Solution Authors