I am able to call Looker’s 3.0 API with a user_attribute
. It’s really neat, I can take some user_attribute like user_id
or some_arbitrary_field
from my own system, and pass it to my pre-defined Look so that it filters on that specific data. 👍
My implementation for that is currently based on this article. Based on that article, I understand that this is the process for passing a user_attribute
to a pre-defined Look via the API.
- Get the Look, specifically, the
query
from the pre-defined Look
Run an inline Query using thequery
body above, but with my user attribute(s) plugged in
The query runs great, but the ?cache=true
query parameter does not seem to be taking effect. I cannot tell if the caching period is not working properly, if my invocation is wrong, or what is causing the cache
parameter to not be effective.
My query takes several seconds every time it runs.
If I do ?cache_only=true
, then the query is cached and takes less than 1s every time, but I do not know if that’s the behavior I want.
The docs state that cache
will “Get results from cache if available.”
And that cache_only
will “Retrieve any results from cache even if the results have expired.”
I guess my questions are as follows.
- Is my implementation wrong? Should I be doing this another way?
- Why doesn’t
cache=true
ever seem to be using cached data? - Where in the Looker Admin UI can i see/modify the cache time for my Look?