Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redash WebApp and Redash API are giving different results for the same query #6743

Open
Auburngrads opened this issue Feb 5, 2024 · 2 comments

Comments

@Auburngrads
Copy link

Redash WebApp and Redash API are giving different results for the same query

My orginazation uses Redash as a front-end GUI, for tables created in DataBricks. One of the tables is updated on the first of each month to append the previous month's data. We've been asked to export the data into an Excel file. One option for doing this is to manually export the data from Redash and save it to Excel. My preferred option is to export the data using the Redash API. I'm currently using the R package httr to make calls to the API and export the data. However, I'm having issues where the data returned by the API doesn't include the latest month of data whereas when I use the Redash webapp the table returned does include the newest data.

  • Initially, I thought that I was getting cached results because I hadn't included max_age = 0 in my calls. However, adding this key didn't fix the issue.

  • Out of frustration, I then updated my approach such that each API 'call' was composed of three calls

    • Call 1 to create a new query
      (works fine)
    • Call 2 to retrieve the results from the new query
      (technically works, but returns outdated data)
    • Call 3 to archive the query
      (works fine)

I thought that this approach, while a bit of an overkill, would avoid getting outdated results - however I was mistaken. At this point I'm at a loss for what to do and I'm not sure how the same query can return different results depending on the method used to submit the query.

Technical details:

  • Redash Version: Only use Redash Webapp
  • Browser/OS: Edge/Chrome Windows
  • How did you install Redash: Only use Redash Webapp
@guidopetri
Copy link
Collaborator

Hi! Thanks for the bug report. What version of Redash are you using? Do you have an examplo query that is generating different results?

@Auburngrads
Copy link
Author

Auburngrads commented Feb 5, 2024

I passed the question about the Redash version on to our admins, but am not sure how quickly they will respond. Where would I find the Redash version information on the web app?

As far as examples, they are all simple queries of the form SELECT * from database.table as most of the work was done upstream in DataBricks to create these output tables.

What's strange is if I go into the web app and run one of the archived queries (that I created using the API) and then use the API again I get the updated table - almost like Redash stores two versions of the table and I need to poke the API to ensure it returns the most current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants