-
-
Notifications
You must be signed in to change notification settings - Fork 278
Scheduling should also add SQL query to grid metadata #503
Comments
Argh, that's a good point. Unfortunately we'll probably have to fix this for 2.5, because otherwise the following is possible/likely:
@briandennis @n-riesco is the above correct? |
@nicolaskruchten I was under the impression that the UI to schedule queries will be removed from onprem (doesn't that include this tab?) |
It will, but in 2.6 |
@tarzzz What API does the onprem webapp use to set/update this metadata? @nicolaskruchten I think fixing this issue requires changes on both sides:
|
Why does the webapp need to understand the new cronInterval? |
@nicolaskruchten What data goes into this metadata? From @tarzzz 's comment, it sounds like |
Ah, I see what you mean. I think that so long as the SQL Query is correct we can get away with sending the 'nearest' refreshInterval. We don't have the bandwidth to modify the webapp-size code at the moment. |
@nicolaskruchten I don't think it's possible to define the 'nearest' Currently new scheduled queries (i.e those that set |
We'll have to come up with a 'mostly good' heuristic. It won't be very good for the Mon/Tue/Thu case but we'll live with it. |
@nicolaskruchten Also note that |
re 'mostly good' heuristic: we need to do something similar when determining which cron mode to show in the UI by default. For reference, the code for that is here |
OK, so it looks like whenever Falcon saves a query, we'll need to The {
"connectorUrl": "https://nicolas-026480bf-62bf-4b19-be6c-3.plotly-connector.com:9495",
"query": "SELECT * FROM auth_group \nLIMIT 10;",
"connectionId": "postgres-c959ea39-857f-4774-a43e-2978b3420c53"
} And The impact of the |
Here's the webapp code that does the metadata call: https://github.com/plotly/streambed/blob/de12e76b5640b40747b14deaf095ff0db3de0fb0/shelly/webapp/static/webapp/src/workspace/actions/sql_connector.js#L287 |
When the query is scheduled from Chart studio, the SQL query is stored with the grid-metadata, and it appears in the webapp under tab 'SQL Query' . It doesn't appear when the query is scheduled from Falcon:
The fix here would be to send the query and the refresh interval as the payload for the new created grid.
The text was updated successfully, but these errors were encountered: