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

Comments

@durchgedreht
Copy link

@durchgedreht durchgedreht commented Dec 27, 2019

  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 #bug label Dec 27, 2019
@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Dec 27, 2019

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

This comment has been minimized.

Copy link
Contributor

@villebro villebro commented Dec 27, 2019

@durchgedreht are you using Redis to cache results?

@durchgedreht

This comment has been minimized.

Copy link
Author

@durchgedreht durchgedreht commented Dec 27, 2019

No, I'm running against Clickhouse directly.

@durchgedreht

This comment has been minimized.

Copy link
Author

@durchgedreht durchgedreht commented Dec 27, 2019

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

This comment has been minimized.

Copy link
Contributor

@villebro villebro commented Dec 27, 2019

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

This comment has been minimized.

Copy link
Author

@durchgedreht durchgedreht commented Dec 27, 2019

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

@villebro villebro mentioned this issue Dec 29, 2019
3 of 12 tasks complete
@tcopple

This comment has been minimized.

Copy link

@tcopple 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
Projects
None yet
3 participants
You can’t perform that action at this time.