How to make a follow up query in custom visualization

  • 18 May 2021
  • 1 reply

Hi I’m building a custom visualization where we need to make an additional query based on the data passed in. The generic flow looks like this:

  1. Pass the queried dataset into the visualization.
  2. Visualization looks at the first row and gets an id (it will be unique for the dataset).
  3. Visualization makes another query to get potentially large amount of metadata associated with that id.
  4. Use the associated metadata to render the data.

In our specific case our “dataset” is a set of locations which have x/y coordinates, and our “metadata” is a large png image file that they will be rendered on top of. The image file is dynamic so we can’t use built in looker mapping tools.


In our case, we have a couple of different ways to query the data, either through an API call to our server APIs or by making an additional query to looker. Our APIs are authentication, and I’m not sure how to get the looker visualization authenticated. The ideal option, I think, would be to be able to make a subsequent query to the data store asking for this data, but I’m not sure how to do that. Has anyone done something like this before?



This topic has been closed for comments

1 reply

Ahh, I just stumbled across this older post discussing something similar.


It looks like we can use this API feature from the visualization `run_inline_query()`: