question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query API fails to return cached result if query has parameters

See original GitHub issue

Issue Summary

I’m using Python3.6 on MacOS High Sierra. When using the query API, I cannot retrieve cached results for a query if it has parameters.

Steps to Reproduce

  1. Set up a dummy query with a where clause and without parameters, run it to get results
  2. Call /api/queries/<dummy_query_id>/results.csv and everything is fine
  3. Replace the hardcoded value in the where clause with a parameter, run the query to get results
  4. Call the same API, and get the following error: {'message': 'No cached result found for this query. You have requested this URI [/api/queries/364/results.csv] but did you mean /api/query_results or /api/queries/<query_id>/refresh or /api/query_results/<query_result_id> ?'}

Technical details:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cinspire93commented, Mar 14, 2018

Hi Richard, I have gotten it to work with a workaround indeed. That said, I guess a new suggestion would be adding the ability to query for cached results even if a query has parameters. We have some pipelines internally that could benefit a lot from the speed that comes with Redash’s cached results.

1reaction
cinspire93commented, Mar 20, 2018

Hi Richard, sorry for the terribly late reply. Your suggestion sounds good. It is definitely not breaking anything for us, so let’s just keep an eye on this. Thanks for looking into it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS API Gateway Caching by Query Parameter not working
I have AWS API gateway setup with a single GET method, which has 1 query parameter search . This GET call returns a...
Read more >
Caching content based on query string parameters
A query string is the part of a web request that appears after a ? character; ... Cache based only on parameters for...
Read more >
Error running query: No cached result available for query
I have run the underlying query many times with no apparent caching effect. The underlying query uses parameters (hence the need to access...
Read more >
Reading and writing data to the cache - Apollo GraphQL Docs
If the cache is missing data for any of the query's fields, readQuery returns null . It does not attempt to fetch data...
Read more >
Recommended Parameters for Queries that Load the Cache
If there is an error while storing the results of the query, the rows that already have been inserted will remain there. However,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found