Closed devarshi-007 closed 11 months ago
As per my knowledge, insights using query result to build a chart. So, every time I have to execute a query to get updated result. Am I correct ? or is there any other way ... ?
If I understood correctly, you want to refresh the chart every time the database table data is updated?
It's not possible in Insights. As far as I know, there's not way to trigger an event on Insights when database table is updated. The best we can do is set the chart to get refreshed every 5 seconds.
Ok thanks. So that mean we also cannot write dynamic queries (like query contains variable like
select $a from table;
and we pass $a as column name
If I understood correctly, you want to refresh the chart every time the database table data is updated?
It's not possible in Insights. As far as I know, there's not way to trigger an event on Insights when database table is updated. The best we can do is set the chart to get refreshed every 5 seconds.
And also as I know, there is no need for chart refresh because once query result is updated, chart is updated
It's not possible to use variables in SQL queries currently but I plan to do it. You can however try to use Script Query which is a lot more flexible as it's plain Python code
And yes, the chart will be updated if the query result is updated.
Okay thanks.
When I write a query to visualize it into a chart, It will visualize it. But when in live system new data added or updated, I have to execute query again to see updated visualization in chart. Is there any way that chart will update automatically (or query will execute automatically) when data source's some table are updated ?