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

SQL Lab Query doesn't get reflected in chart #8898

Closed
durchgedreht opened this issue Dec 27, 2019 · 7 comments · Fixed by #8901
Closed

SQL Lab Query doesn't get reflected in chart #8898

durchgedreht opened this issue Dec 27, 2019 · 7 comments · Fixed by #8901
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@durchgedreht
Copy link

  1. I go into SQL Lab and create a query. e.g. "SELECT * FROM data_table WHERE id > 10;"
  2. Then I do save the query.
  3. Clicking on 'run'.
  4. On the data view click on 'explore'
  5. Create a char with e.b. Bar Charts
  6. Save chart as "MyChart"

THEN:

  1. Open saved query and change it. e.g. "SELECT * FROM data_table WHERE id >999"
  2. Save changed query
  3. Reopen Chart
  4. Data is same as before
  5. Chart datasource is something like "foo@bar.com --queryname-FYzgGs0CD"

Expected results

I'd expect the chart reflects the changed query and doesn't do an 'in-time-smapshot'

OR

Another way to point to the 'original' query using a kind of pointer logic.
(By the way - changing a Datasource to SQLLab Query seems non supported as well)

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Dec 27, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@villebro
Copy link
Member

@durchgedreht are you using Redis to cache results?

@durchgedreht
Copy link
Author

No, I'm running against Clickhouse directly.

@durchgedreht
Copy link
Author

To be more precise: I can edit the query in the data source view within the chart and can see the changes are not reflected. I'm wondering why every query should be immutable bound to a chart? This way it's pretty hard to do changes upon the same query. Fixing an error will result in n changes. This seems unwanted as changes in the other data sources are also reflected - so why should SQL queries underneath a chart behave differently?

@villebro
Copy link
Member

FYI I identified a bug (or more like an oversight) in the code that I've already fixed locally thanks to this ticket. Will do some more testing and put in PR in the coming days.

@durchgedreht
Copy link
Author

Ok, cool! I'll keep an eye to the ticket so I will do some testing when done.

@tcopple
Copy link

tcopple commented Dec 30, 2019

Is this a bug? I thought this was intentional. I agree it's frustrating but I just assumed the "derived" queries created from SqlLab were intentional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants