Google Sheets IMPORTDATA not refreshing with new Query Results


#1

Hey Guys,

I love the feature that allows redash query results to be displayed in Google Sheets via the IMPORTDATA function, however I can’t seem to get the data to update when the query re-runs. Any ideas or advice on the refreshing of data when using the API to import into Google Sheets?


#2

There are several reasons data might not update:

  1. Google Sheets has its own caching mechanism and it updates the data based on its own schedule. I’m not sure if the interval is documented, you can check their documentation.
  2. You should make sure to use the results API call: /api/queries/<query id>/results.csv vs. an API call that mentions the query result ID.
  3. If this is a query with parameters, it might be another reason why this doesn’t get updates. Queries with parameters are not supported (at the moment) with this feature.